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