Package it.unive.lisa.util
Class StringUtilities
- java.lang.Object
-
- it.unive.lisa.util.StringUtilities
-
public class StringUtilities extends java.lang.ObjectUtility methods for building and manipulating strings.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Stringindent(java.lang.String target, java.lang.String indent, int amount)Indents all lines oftargetby usingindentrepeatedamounttimes.static java.lang.Stringordinal(int i)Yields the ordinal for the given integer by appending eitherst,nd,rd, orthto it.
-
-
-
Method Detail
-
ordinal
public static java.lang.String ordinal(int i)
Yields the ordinal for the given integer by appending eitherst,nd,rd, orthto it.- Parameters:
i- the integer- Returns:
- the ordinal string
-
indent
public static java.lang.String indent(java.lang.String target, java.lang.String indent, int amount)Indents all lines oftargetby usingindentrepeatedamounttimes.- Parameters:
target- the string to indentindent- the string to use as indentationamount- the number of timesindentshould be repeated- Returns:
- the indented string
-
-