Class StringUtils


  • public class StringUtils
    extends Object
    Utility class to parse a list of strings
    Author:
    Tomas Repel
    • Constructor Detail

      • StringUtils

        public StringUtils()
    • Method Detail

      • tokenize

        public static List<String> tokenize​(String stringToBeParsed)
        Parse string to tokens. Tokens are separated by whitespace. In case some token contains whitespace, the whole token has to be quoted. For instance string 'opt0 opt1=val1 "opt2=val2 with space"' results in three tokens.
        Parameters:
        stringToBeParsed - - string to be parsed to tokens
        Returns:
        List of tokens, returns empty list rather that null value
      • trimMultiline

        public static String trimMultiline​(String toTrim)