Class StrUtil

java.lang.Object
pl.decerto.hyperon.runtime.helper.StrUtil

public class StrUtil extends Object
Author:
przemek hertel
  • Method Details

    • compactSpaces

      public static String compactSpaces(String s)
      Replaces all occurrences of many spaces adjacent to each other in one space character. Does not trim. If argument is null - the function returns null.
      Parameters:
      s - String object to remove all occurrences of many spaces adjacent to each other in one space character
      Returns:
      input s value without many spaces adjacent to each other or if input s value is null return null
    • trunc

      public static String trunc(String s, int maxlen)
    • isInteger

      public static boolean isInteger(String value)
    • lowercase

      public static String lowercase(String str)
    • isEmpty

      public static boolean isEmpty(CharSequence str)
    • isBlank

      public static boolean isBlank(CharSequence str)
    • repeat

      public static String repeat(char ch, int n)