public TrailingCharacterIsWhitespaceOrTerminator ( string text, NSRange position ) : bool | ||
text | string | The text to test. |
position | NSRange | The current cursor position inside the text. |
Результат | bool |
public virtual bool TrailingCharacterIsWhitespaceOrTerminator(string text, NSRange position) {
var found = false;
// At end of line?
if (position.Location >= text.Length-1) {
// Yes, always true
return true;
}
// Found?
var c = text [(int)(position.Location + 1)];
found = (c == ' ' | c == Newline || c == LineSeparator || c == ParagraphSeparator);
// Return result
return found;
}