Limits the string to n character
n
Example:
import { limit } from "@thalesrc/js-utils/string"; const str = 'foobarbaz'; limit(str, 3); // 'foo'
Prototype Example:
import "@thalesrc/js-utils/string/proto/limit"; const str = 'foobarbaz'; str.limit(3); // 'foo'
Count to limit string character size
Limited string
Generated using TypeDoc
Limit
Limits the string to
n
characterExample:
import { limit } from "@thalesrc/js-utils/string"; const str = 'foobarbaz'; limit(str, 3); // 'foo'
Prototype Example:
import "@thalesrc/js-utils/string/proto/limit"; const str = 'foobarbaz'; str.limit(3); // 'foo'