public class StringManipulationHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] args)
Main method of this string helper utility.
|
static java.lang.String |
truncate(java.lang.String aString,
char delimiter,
int maxLength)
This will truncate a string from the last occurrence of a particular
delimiter to the maximum specified length.
|
static java.lang.String |
truncate(java.lang.String aString,
int maxLength)
This method takes a string and truncates it to a specific length.
|
public static final java.lang.String COPYRIGHT
public static void main(java.lang.String[] args)
args
- optional arguments from the command linepublic static java.lang.String truncate(java.lang.String aString, char delimiter, int maxLength)
aString
- input stringdelimiter
- delimiter used in the string truncationmaxLength
- the specific length of the output stringpublic static java.lang.String truncate(java.lang.String aString, int maxLength)
aString
- input stringmaxLength
- the specific length of the output string