MCPcopy Index your code
hub / github.com/simstudioai/sim / getByteLength

Function getByteLength

apps/sim/stores/terminal/console/utils.ts:22–24  ·  view source on GitHub ↗

* Returns the UTF-8 byte length of a string.

(value: string)

Source from the content-addressed store, hash-verified

20 * Returns the UTF-8 byte length of a string.
21 */
22function getByteLength(value: string): number {
23 return textEncoder.encode(value).length
24}
25
26/**
27 * Truncates a string while preserving a short explanation.

Callers 1

capNormalizedValueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected