uce/site/doc/pages/String.txt

21 lines
666 B
Plaintext

:sig
String
:desc
Primary string type used throughout UCE.
`String` is an alias for `std::string`.
It is used for request data, headers, cookie values, file contents, query strings, JSON text, and WebSocket payloads.
Because it is backed by `std::string`, it is binary-safe and may also contain raw bytes.
For UTF-8-aware splitting, use helpers such as `split_utf8()` instead of assuming one byte equals one character.
:see
>types
:related
**PHP:** Native PHP strings with helpers such as `substr()`, `trim()`, `explode()`, and `implode()`
**JavaScript / Node.js:** JavaScript `string` values with methods such as `slice()`, `trim()`, `split()`, and `join()`