Package: thinkmap.string
This module contains useful string functions
Functions
Strips a string of any HTML.
Parameters:
the string that is to be stripped of HTML
Returns:
string
the new string stripped of HTML
Trims a string of any preceding or tailing white space.
Parameters:
the string that is to be trimmed of preceding and trailing white space
truncateNicely(
string,
length
)
⇒
string
Truncates a String to a given length without breaking up words, while also adding an ellipsis at the end(...).
The returned string, including the ellipses, will not exceed the given length parameter.
If the length given exceeds the length of the string, then the original string is returned.
Parameters:
the string that is to be truncated
the length to truncate the string down to