Class CaseUtil


  • public final class CaseUtil
    extends Object
    Utilities related to various case operations.

    For internal use only. May be renamed or removed in a future release.

    Since:
    1.0
    Author:
    Vaadin Ltd
    • Method Detail

      • upperCaseUnderscoreToHumanFriendly

        public static String upperCaseUnderscoreToHumanFriendly​(String upperCaseUnderscoreString)
        Converts an UPPER_CASE_STRING to a human friendly format (Upper Case String).

        Splits words on _. Examples:

        MY_BEAN_CONTAINER becomes My Bean Container AWESOME_URL_FACTORY becomes Awesome Url Factory SOMETHING becomes Something

        Parameters:
        upperCaseUnderscoreString - The input string in UPPER_CASE_UNDERSCORE format
        Returns:
        A human friendly version of the input
      • capitalize

        public static String capitalize​(String string)
        Capitalizes the first character in the given string in a way suitable for use in code (methods, properties etc).
        Parameters:
        string - The string to capitalize
        Returns:
        The capitalized string