CommaTokenizer
open class CommaTokenizer : MultiAutoCompleteTextView.Tokenizer
| kotlin.Any | |
| ↳ | android.widget.MultiAutoCompleteTextView.CommaTokenizer |
This simple Tokenizer can be used for lists where the items are separated by a comma and one or more spaces.
Summary
| Public constructors | |
|---|---|
| Public methods | |
|---|---|
| open Int |
findTokenEnd(text: CharSequence!, cursor: Int)Returns the end of the token (minus trailing punctuation) that begins at offset |
| open Int |
findTokenStart(text: CharSequence!, cursor: Int)Returns the start of the token that ends at offset |
| open CharSequence! |
terminateToken(text: CharSequence!)Returns |
Public constructors
CommaTokenizer
CommaTokenizer()
Public methods
findTokenEnd
open fun findTokenEnd(
text: CharSequence!,
cursor: Int
): Int
Returns the end of the token (minus trailing punctuation) that begins at offset cursor within text.
findTokenStart
open fun findTokenStart(
text: CharSequence!,
cursor: Int
): Int
Returns the start of the token that ends at offset cursor within text.
terminateToken
open fun terminateToken(text: CharSequence!): CharSequence!
Returns text, modified, if necessary, to ensure that it ends with a token terminator (for example a space or comma).