Package org.teavm.classlib.impl.regex
Class SplitFastPath
java.lang.Object
org.teavm.classlib.impl.regex.SplitFastPath
-
Method Summary
Modifier and TypeMethodDescriptionstatic intsingleChar(String regex) Checks whether splitting by the given regular expression is equivalent to splitting by a single character, i.e. whether regex is either a single character without special meaning, or a backslash followed by a character which is neither ASCII letter nor digit.
-
Method Details
-
singleChar
Checks whether splitting by the given regular expression is equivalent to splitting by a single character, i.e. whether regex is either a single character without special meaning, or a backslash followed by a character which is neither ASCII letter nor digit. Used both byString.splitat run time and byPatternCompileTransformerat compile time.- Returns:
- the character to split by, or -1 if fast path is not applicable.
-