String Token
Functions which perform percent-decoding return values using std::string
when called without special arguments.
This is the best default for ergonomics, and a good enough default for performance considering that many decoded strings fit in the small buffer available to most standard implementations.
Some use-cases may desire more control over how these algorithms acquire and store data in strings, for example:
-
Returning a string using a non-default allocator
-
Reusing the storage of an existing string
-
Appending to existing strings
The library provides a special customization mechanism called StringToken to control how algorithms which require an output buffer acquire their storage. The signature