Class Util

java.lang.Object
org.apache.commons.cli.Util

final class Util extends Object
Contains useful helper methods for classes within this package.
  • Field Details

    • EMPTY_STRING_ARRAY

      static final String[] EMPTY_STRING_ARRAY
      An empty immutable String array.
  • Constructor Details

    • Util

      Util()
  • Method Details

    • stripLeadingAndTrailingQuotes

      static String stripLeadingAndTrailingQuotes(String str)
      Remove the leading and trailing quotes from str. E.g. if str is '"one two"', then 'one two' is returned.
      Parameters:
      str - The string from which the leading and trailing quotes should be removed.
      Returns:
      The string without the leading and trailing quotes.
    • stripLeadingHyphens

      static String stripLeadingHyphens(String str)
      Remove the hyphens from the beginning of str and return the new String.
      Parameters:
      str - The string from which the hyphens should be removed.
      Returns:
      the new String.