Class StringUtils

java.lang.Object
org.dalesbred.internal.utils.StringUtils

public final class StringUtils extends Object
Utilities for strings.
  • Method Details

    • capitalize

      @NotNull public static @NotNull String capitalize(@NotNull @NotNull String s)
      Returns given string with its first letter in uppercase.
    • rightPad

      @NotNull public static @NotNull String rightPad(@NotNull @NotNull String s, int length, char padding)
    • truncate

      @NotNull public static @NotNull String truncate(@NotNull @NotNull String s, int length)
    • truncate

      @NotNull public static @NotNull String truncate(@NotNull @NotNull String s, int length, @NotNull @NotNull String suffix)
    • isEqualIgnoringCaseAndUnderscores

      public static boolean isEqualIgnoringCaseAndUnderscores(@NotNull @NotNull String s1, @NotNull @NotNull String s2)
      Returns true if two strings are equal, apart from case differences and underscores. Underscores in both sides are totally ignored.