Class StringUtils

java.lang.Object
io.github.mfvanek.pg.generator.utils.StringUtils

public final class StringUtils extends Object
  • Method Details

    • truncate

      public static String truncate(String str, int maxWidth)
      Truncates a String. Similar to the truncate method from Apache commons-lang3.
      Parameters:
      str - the String to truncate, cannot be null
      maxWidth - maximum length of result String, must be positive
      Returns:
      truncated String