Class StringUtils

java.lang.Object
org.apache.fop.afp.util.StringUtils

public final class StringUtils extends Object
Library of utility methods useful in dealing with strings.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    lpad(String input, char padding, int length)
    Padds the string to the left with the given character for the specified length.
    static String
    rpad(String input, char padding, int length)
    Padds the string to the right with the given character for the specified length.

    Methods inherited from class java.lang.Object

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

    • StringUtils

      private StringUtils()
  • Method Details

    • lpad

      public static String lpad(String input, char padding, int length)
      Padds the string to the left with the given character for the specified length.
      Parameters:
      input - The input string.
      padding - The char used for padding.
      length - The length of the new string.
      Returns:
      The padded string.
    • rpad

      public static String rpad(String input, char padding, int length)
      Padds the string to the right with the given character for the specified length.
      Parameters:
      input - The input string.
      padding - The char used for padding.
      length - The length of the new string.
      Returns:
      The padded string.