MCPcopy Create free account
hub / github.com/cryptii/cryptii / normalizeWhitespaces

Method normalizeWhitespaces

src/StringUtil.js:73–75  ·  view source on GitHub ↗

* Replaces Unicode whitespace characters with U+20 space character. * @param {string} string Haystack * @param {Boolean} [reduceToSingle=false] Wether to replace * multiple successive space characters with a single one * @return {string}

(string, reduceToSingle = false)

Source from the content-addressed store, hash-verified

71 * @return {string}
72 */
73 static normalizeWhitespaces (string, reduceToSingle = false) {
74 return this.replaceWhitespaces(string, ' ', reduceToSingle)
75 }
76
77 /**
78 * Replaces Unicode whitespace characters with given character.

Callers 1

performTranslateMethod · 0.80

Calls 1

replaceWhitespacesMethod · 0.95

Tested by

no test coverage detected