MCPcopy Create free account
hub / github.com/unconed/TermKit / trim

Function trim

HTML/external/syntaxhighlighter_3.0.83/src/shCore.js:934–937  ·  view source on GitHub ↗

* Removes all white space at the begining and end of a string. * * @param {String} str String to trim. * @return {String} Returns string without leading and following white space characters.

(str)

Source from the content-addressed store, hash-verified

932 * @return {String} Returns string without leading and following white space characters.
933 */
934function trim(str)
935{
936 return str.replace(/^\s+|\s+$/g, '');
937};
938
939/**
940 * Unindents a block of text by the lowest common indent amount.

Callers 3

unindentFunction · 0.85
stripCDataFunction · 0.85
shCore.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected