measure
Measures a string the way a filesystem does.
Import:
import { measure } from '@mnaoumov/obsidian-lib/path-compatibility';Signature:
function measure($string: string, shouldMeasureInBytes: boolean): numberParameters:
| Parameter | Type | Description |
|---|---|---|
$string |
string | |
shouldMeasureInBytes |
boolean | Whether to count UTF-8 bytes rather than UTF-16 units. |
Returns: number — The length.