code: @Override
      public int findTokenEnd(final @NonNull Spanned text, final int cursor) {
          int i = cursor;
          int end = getSearchEndIndex(text, cursor);
  
          // Starting from the cursor, increment i until it reaches the first word-breaking char
          while (i >= 0 && i < end) {
              if (isWordBreakingChar(text.charAt(i))) {
                  return i;
              } else {
                  i++;
              }
          }
  
          return i;
      }
docs: {@inheritDoc}