类 StringUtil


  • public final class StringUtil
    extends Object
    This is the string util
    作者:
    TheodoreHills
    • 方法详细资料

      • IsEmpty

        public static boolean IsEmpty​(String val)
        Check the string is empty
        参数:
        val - The string you want to check
        返回:
        True while the string is empty, otherwise return false
      • IsNotEmpty

        public static boolean IsNotEmpty​(String val)
        Check the string is not empty
        参数:
        val - The string you want to check
        返回:
        True while the string is not empty, otherwise return false
      • IsBlank

        public static boolean IsBlank​(String val)
        Check the string is blank
        参数:
        val - The string you want to check
        返回:
        True while the string is blank, otherwise return false. Blank means the string is meaningless, or it only got spaces or tabs in it.
      • Format

        public static String Format​(String format,
                                    Object... args)
        Format any string using wild card of "{}"
        参数:
        format - The origin format string.
        args - The args to be put into the string.
        返回:
        An formatted string.
      • Count

        public static int Count​(String base,
                                String subString)
        To count how many times does the substring in the base string.
        参数:
        base - The original string.
        subString - The substring.
        返回:
        The number of the count.