# chars/slice
Substring by CODEPOINT indices `[a, b)` — identical to `slice` on
strings (kept as a self-documenting form). `b` clamps to the string
end, `a` to 0; `a >= b` yields `""`.
## Syntax
[chars/slice $string $a $b]
## Examples
set s "a中c" [chars/slice $s 1 2] # "中" [chars/slice $s 0 2] # "a中" [chars/slice $s 2 99] # "c" — b clamps
## Returns
String.
## See Also
`slice`, `char-at`, `width`, `cells`