Class StringUtils

java.lang.Object
io.micrometer.core.instrument.util.StringUtils

@Deprecated public final class StringUtils extends Object
Deprecated.
Please use StringUtils instead.
Utilities for String.
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    isBlank(String string)
    Deprecated.
    Check if the String is null or has only whitespaces.
    static boolean
    isEmpty(String string)
    Deprecated.
    Check if the String is null or empty.
    static boolean
    Deprecated.
    Check if the String has any non-whitespace character.
    static boolean
    Deprecated.
    Check if the String has any character.
    static String
    truncate(String string, int maxLength)
    Deprecated.
    Truncate the String to the max length.
    static String
    truncate(String string, int maxLength, String truncationIndicator)
    Deprecated.
    Truncate the String to the max length and append string to indicate if truncation was applied

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • isBlank

      public static boolean isBlank(@Nullable String string)
      Deprecated.
      Check if the String is null or has only whitespaces. Modified from org.apache.commons.lang.StringUtils#isBlank(String).
      Parameters:
      string - String to check
      Returns:
      true if the String is null or has only whitespaces
    • isNotBlank

      public static boolean isNotBlank(@Nullable String string)
      Deprecated.
      Check if the String has any non-whitespace character.
      Parameters:
      string - String to check
      Returns:
      true if the String has any non-whitespace character
    • isEmpty

      public static boolean isEmpty(@Nullable String string)
      Deprecated.
      Check if the String is null or empty.
      Parameters:
      string - String to check
      Returns:
      true if the String is null or empty
    • isNotEmpty

      public static boolean isNotEmpty(@Nullable String string)
      Deprecated.
      Check if the String has any character.
      Parameters:
      string - String to check
      Returns:
      true if the String has any character
      Since:
      1.1.0
    • truncate

      public static String truncate(String string, int maxLength)
      Deprecated.
      Truncate the String to the max length.
      Parameters:
      string - String to truncate
      maxLength - max length
      Returns:
      truncated String
    • truncate

      public static String truncate(String string, int maxLength, String truncationIndicator)
      Deprecated.
      Truncate the String to the max length and append string to indicate if truncation was applied
      Parameters:
      string - String to truncate
      maxLength - max length, which includes the length required for truncationIndicator
      truncationIndicator - A string that is appended if string is truncated
      Returns:
      truncated String