Package gg.xp.util

Class ArgParser

java.lang.Object
gg.xp.util.ArgParser

public class ArgParser extends Object
  • Constructor Details

    • ArgParser

      public ArgParser()
  • Method Details

    • tokenize

      public static List<String> tokenize(String arguments)
      Tokenizes the given String into String tokens
      Parameters:
      arguments - A String containing one or more command-line style arguments to be tokenized.
      Returns:
      A list of parsed and properly escaped arguments.
    • tokenize

      public static List<String> tokenize(String arguments, boolean stringify)
      Tokenizes the given String into String tokens.
      Parameters:
      arguments - A String containing one or more command-line style arguments to be tokenized.
      stringify - whether or not to include escape special characters
      Returns:
      A list of parsed and properly escaped arguments.
    • _escapeQuotesAndBackslashes

      protected static String _escapeQuotesAndBackslashes(String s)
      Inserts backslashes before any occurrences of a backslash or quote in the given string. Also converts any special characters appropriately.