Esempio n. 1
0
 public boolean isAtStartOfWord(int i) {
   if (i < 0 || i > getText().length()) return true;
   return (text.charAt(i - 1) == ' ' || text.charAt(i - 1) == '\n')
       && (text.charAt(i) != ' ' && text.charAt(i) != '\n');
 }
Esempio n. 2
0
 public boolean isAtEndOfWord(int i) {
   return text.charAt(i - 1) != ' '
       && text.charAt(i - 1) != '\n'
       && (text.charAt(i) == ' ' || text.charAt(i) == '\n');
 }