GREM 3.12.0
Game/Rendering Engine Modules for C++
Loading...
Searching...
No Matches
grem::uri Namespace Reference

Functions

String percentEncode (StringView data)
 Encode arbitrary data into a percent-encoded string.
String percentDecode (StringView string)
 Decode the original data from a percent-encoded string.

Function Documentation

◆ percentEncode()

String grem::uri::percentEncode ( StringView data)
nodiscard

Encode arbitrary data into a percent-encoded string.

Parameters
datainput data to encode.
Returns
a percent-encoded string containing the encoded representation of the input.
Exceptions
std::length_errorif the length of the encoded string exceeds the maximum supported string size.
std::bad_allocon allocation failure.

◆ percentDecode()

String grem::uri::percentDecode ( StringView string)
nodiscard

Decode the original data from a percent-encoded string.

Parameters
stringpercent-encoded string to decode.
Returns
a byte sequence containing the data decoded from the percent-encoded string.
Exceptions
std::length_errorif the length of the decoded byte sequence exceeds the maximum supported string size.
std::bad_allocon allocation failure.