# MultiAutoCompleteTextView.Tokenizer

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Methods](https://developer.android.com/reference/android/widget/MultiAutoCompleteTextView.Tokenizer#pubmethods)  

# MultiAutoCompleteTextView.Tokenizer

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/widget/MultiAutoCompleteTextView.Tokenizer "View this page in Kotlin")\|Java

`
public
static


interface
MultiAutoCompleteTextView.Tokenizer
`  
`


`

|----------------------------------------------------|
| android.widget.MultiAutoCompleteTextView.Tokenizer |

|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Known indirect subclasses [MultiAutoCompleteTextView.CommaTokenizer](https://developer.android.com/reference/android/widget/MultiAutoCompleteTextView.CommaTokenizer),[Rfc822Tokenizer](https://developer.android.com/reference/android/text/util/Rfc822Tokenizer) |---------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [MultiAutoCompleteTextView.CommaTokenizer](https://developer.android.com/reference/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.                                                                                                                     | | [Rfc822Tokenizer](https://developer.android.com/reference/android/text/util/Rfc822Tokenizer)                                                | This class works as a Tokenizer for MultiAutoCompleteTextView for address list fields, and also provides a method for converting a string of addresses (such as might be typed into such a field) into a series of Rfc822Tokens. | |

<br />

*** ** * ** ***

## Summary

|                                                                                                                                                                                                                         ### Public methods                                                                                                                                                                                                                         ||
|--------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract int`                                                                            | ` `[findTokenEnd](https://developer.android.com/reference/android/widget/MultiAutoCompleteTextView.Tokenizer#findTokenEnd(java.lang.CharSequence,%20int))`(`[CharSequence](https://developer.android.com/reference/java/lang/CharSequence)` text, int cursor) ` Returns the end of the token (minus trailing punctuation) that begins at offset`cursor`within`text`.   |
| ` abstract int`                                                                            | ` `[findTokenStart](https://developer.android.com/reference/android/widget/MultiAutoCompleteTextView.Tokenizer#findTokenStart(java.lang.CharSequence,%20int))`(`[CharSequence](https://developer.android.com/reference/java/lang/CharSequence)` text, int cursor) ` Returns the start of the token that ends at offset`cursor`within`text`.                            |
| ` abstract `[CharSequence](https://developer.android.com/reference/java/lang/CharSequence) | ` `[terminateToken](https://developer.android.com/reference/android/widget/MultiAutoCompleteTextView.Tokenizer#terminateToken(java.lang.CharSequence))`(`[CharSequence](https://developer.android.com/reference/java/lang/CharSequence)` text) ` Returns`text`, modified, if necessary, to ensure that it ends with a token terminator (for example a space or comma). |

## Public methods

### findTokenEnd

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public abstract int findTokenEnd (CharSequence text, 
                int cursor)
```

Returns the end of the token (minus trailing punctuation) that begins at offset`cursor`within`text`.

<br />

|           Parameters            ||
|----------|-----------------------|
| `text`   | `CharSequence` <br /> |
| `cursor` | `int` <br />          |

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### findTokenStart

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public abstract int findTokenStart (CharSequence text, 
                int cursor)
```

Returns the start of the token that ends at offset`cursor`within`text`.

<br />

|           Parameters            ||
|----------|-----------------------|
| `text`   | `CharSequence` <br /> |
| `cursor` | `int` <br />          |

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### terminateToken

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public abstract CharSequence terminateToken (CharSequence text)
```

Returns`text`, modified, if necessary, to ensure that it ends with a token terminator (for example a space or comma).

<br />

|          Parameters           ||
|--------|-----------------------|
| `text` | `CharSequence` <br /> |

|                                        Returns                                         ||
|--------------------------------------------------------------------------------|--------|
| [CharSequence](https://developer.android.com/reference/java/lang/CharSequence) | <br /> |