Package com.day.text

Class StringAbbreviator

java.lang.Object
com.day.text.StringAbbreviator

public class StringAbbreviator extends Object
String abbreviator that uses a macosx-style ellipsis algorithm, where an ellipsis is added in the middle of a string instead of at the end.
  • Field Details

  • Constructor Details

    • StringAbbreviator

      public StringAbbreviator()
  • Method Details

    • abbreviate

      public String abbreviate(String str, int maxLength)
      Abbreviate str if needed, so that its number of characters is invalid input: '<'= maxChars
    • setEllipsis

      public void setEllipsis(String s)
      Set our ellipsis string, to the default if s is null
    • getEllipsis

      public String getEllipsis()