Class Tokens


  • public final class Tokens
    extends Object
    Utility methods for dealing with tokens.
    • Method Detail

      • splitByComma

        public static Iterable<String> splitByComma​(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 Iterable<String> splitByStar​(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