MCPcopy Create free account
hub / github.com/microsoft/SandDance / stringtrim

Function stringtrim

docs/tests/v2/es6/js/sanddance.js:80030–80033  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

80028}
80029
80030function stringtrim (str) {
80031 if (str.trim) return str.trim()
80032 return str.replace(/^\s+|\s+$/g, '')
80033}
80034
80035function toHex (n) {
80036 if (n < 16) return '0' + n.toString(16)

Callers 1

base64cleanFunction · 0.85

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected