public class TypoLookup
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static TypoLookup |
get(com.android.tools.lint.client.api.LintClient client,
java.lang.String locale,
java.lang.String region)
Returns an instance of the Typo database for the given locale
|
java.util.List<java.lang.String> |
getTypos(byte[] utf8Text,
int begin,
int end)
Look up whether this word is a typo, and if so, return the typo itself and one or more likely
meanings
|
java.util.List<java.lang.String> |
getTypos(java.lang.CharSequence text,
int begin,
int end)
Look up whether this word is a typo, and if so, return the typo itself and one or more likely
meanings
|
@Nullable public static TypoLookup get(@NonNull com.android.tools.lint.client.api.LintClient client, @NonNull java.lang.String locale, @Nullable java.lang.String region)
client - the client to associate with this database - used only for logging. The
database object may be shared among repeated invocations, and in that case client used
will be the one originally passed in. In other words, this parameter may be ignored if
the client created is not new.locale - the locale to look up a typo database for (should be a language code (ISO
639-1, two lowercase character names)region - the region to look up a typo database for (should be a two letter ISO 3166-1
alpha-2 country code in upper case) language code@Nullable
public java.util.List<java.lang.String> getTypos(@NonNull
java.lang.CharSequence text,
int begin,
int end)
text - the string containing the wordbegin - the index of the first character in the wordend - the index of the first character after the word. Note that the search may extend
beyond this index, if for example the word matches a multi-word typo in the
dictionary@Nullable
public java.util.List<java.lang.String> getTypos(@NonNull
byte[] utf8Text,
int begin,
int end)
utf8Text - the string containing the word, encoded as UTF-8begin - the index of the first character in the wordend - the index of the first character after the word. Note that the search may extend
beyond this index, if for example the word matches a multi-word typo in the
dictionary