Class StringUtils

java.lang.Object
org.brapi.schematools.core.utils.StringUtils

public class StringUtils extends Object
  • Constructor Details

    • StringUtils

      public StringUtils()
  • Method Details

    • toSingular

      public static String toSingular(String value)
      Converts the noun from its plural form to its singular form
      Parameters:
      value - a noun to be converted
      Returns:
      singular form of a plural noun
    • toPlural

      public static String toPlural(String value)
      Converts the noun from its singular form to its plural form
      Parameters:
      value - a noun to be converted
      Returns:
      plural form of a singular noun
    • makeValidName

      public static String makeValidName(String string)
      Creates a valid name for use in GraphQL
      Parameters:
      string - a string which might contain invalid characters for a valid GraphQL name
      Returns:
      a valid GraphQL name based on the input string
    • toSentenceCase

      public static String toSentenceCase(String value)
      Makes the first letter in the string upper case
      Parameters:
      value - the string to be converted
      Returns:
      the converted string
    • toParameterCase

      public static String toParameterCase(String value)
      Makes the first letter in the string lower case
      Parameters:
      value - the string to be converted
      Returns:
      the converted string
    • startsWithLowerCase

      public static boolean startsWithLowerCase(String value)
      Determines if the string starts with an lower case character
      Parameters:
      value - the string to be tested
      Returns:
      true if the string starts with an lower case character, false otherwise
    • startsWithUpperCase

      public static boolean startsWithUpperCase(String value)
      Determines if the string starts with an upper case character
      Parameters:
      value - the string to be tested
      Returns:
      true if the string starts with an upper case character, false otherwise