Skip to content

ProtoString Miscellaneous Methods

Seth Clydesdale edited this page Jun 14, 2015 · 29 revisions

<< Back to ProtoString Method Reference

The methods provided here do useful and unusual jobs. Anything that doesn't belong to the other categories ends up here. Consult the table below for more information on these methods.

Miscellaneous Methods

Method Description
charRange() Produces a range of characters specified between a start and end point.
containsString() Checks whether or not a string contains a certain substring.
distance() Calculates the Levenshtein distance between two strings.
enumerateLines() Places a number at the beginning of each newline.
escapeRegExp() Escapes special regular expression characters.
indent() Indents each newline with a tab or a specified character.
pad() Pads the side(s) of a string with whitespace or a specified character.
wordCount() Returns the total number of words in a string.
wordWrap() Wraps words to a newline once the specified line width has been reached.
wrap() Wraps text around a text string.
Clone this wiki locally