Exemple #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');
 }
Exemple #2
0
 public boolean isAtEndOfWord(int i) {
   return text.charAt(i - 1) != ' '
       && text.charAt(i - 1) != '\n'
       && (text.charAt(i) == ' ' || text.charAt(i) == '\n');
 }