Package org.eclipse.sisu.space
Class Tokens
- java.lang.Object
-
- org.eclipse.sisu.space.Tokens
-
public final class Tokens extends java.lang.Object
Utility methods for dealing with tokens.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Iterable<java.lang.String>
splitByComma(java.lang.String text)
Lazily splits the given string into whitespace-trimmed tokens, using comma as the token separator.static java.lang.Iterable<java.lang.String>
splitByStar(java.lang.String text)
Lazily splits the given string into non-trimmed tokens, using star as the token separator.
-
-
-
Method Detail
-
splitByComma
public static java.lang.Iterable<java.lang.String> splitByComma(java.lang.String text)
Lazily splits the given string into whitespace-trimmed tokens, using comma as the token separator.- Parameters:
text
- The text to split into tokens- Returns:
- Sequence of comma-separated tokens
-
splitByStar
public static java.lang.Iterable<java.lang.String> splitByStar(java.lang.String text)
Lazily splits the given string into non-trimmed tokens, using star as the token separator.- Parameters:
text
- The text to split into tokens- Returns:
- Sequence of star-separated tokens
-
-