Public Member Functions | |
| String | append (String str, Object obj) |
| String | capitalize (String str) |
| String | highlight (String str, String search, String className) |
| String | highlight (String str, String search) |
| String | humanize (String str) |
| String | humanize (String str, boolean lowercase) |
| String | pluralize (String str, int count) |
| String | pluralize (String str) |
| String | shortClassName (String className) |
| String | truncate (String str, int length) |
| String | truncate (String str, int length, char repeater) |
Truncates a string to the given length then appends '...'
If characters are not cut off the end, the origional string is returned.
Example: truncate("123456", 3) --> "123..." | truncate("123", 6) --> "123"
| str | - input string | |
| length | - number of characters from str to display including periods. |
Truncates a string to the given length then appends a character to the end three times.
If characters are not cut off the end, the origional string is returned.
Example: truncate("123456", 3, '$') --> "123$$$" | truncate("123", 6, '$') --> "123"
| str | - input string | |
| length | - number of characters from str to display including periods. | |
| repeater | - the character to be repeated 3 times at the end |
1.5.8