Class StringUtils


  • public final class StringUtils
    extends java.lang.Object
    String utilities.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String indent​(java.lang.String s, int spaces)
      Indents the provided string by the provided number of spaces.
      static java.util.List<java.lang.String> lines​(java.lang.String s)
      Splits the given string by the UTF-8 LF U+000A character.
      • Methods inherited from class java.lang.Object

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

      • indent

        public static java.lang.String indent​(java.lang.String s,
                                              int spaces)
        Indents the provided string by the provided number of spaces.
        Parameters:
        s - the string to indent.
        spaces - the number of spaces.
        Returns:
        the indented string.
      • lines

        public static java.util.List<java.lang.String> lines​(java.lang.String s)
        Splits the given string by the UTF-8 LF U+000A character.
        Parameters:
        s - the string to split.
        Returns:
        the list of string lines.