Function
judo_stringify
Lexeme to decoded string.
Parameters 🔗
lexeme | in | Lexeme of a string or object member name. |
length | in | Number of UTF-8 code units in |
buf | out | Buffer to receive the decoded string. |
buflen | inout | Code unit capacity of |
Return Value 🔗
JUDO_SUCCESS | If the numeric value was written to |
JUDO_INVALID_OPERATION | If |
JUDO_NO_BUFFER_SPACE | If |
JUDO_MALFUNCTION | If there is a defect in the implementation. |
Discussion 🔗
The judo_stringify function decodes (i.e. unescapes) the string or object member name referenced by lexeme
and writes it to buf
. The number of code units in lexeme
is specified by length
.
The buflen
parameter must be the capacity of buf
. The implementation will update buflen
with the number of code units written to buf
.
If buf
is null, then buflen
must be zero and the implementation will write to buflen
the number of code units in the decoded lexeme. Calling the function this way is useful for calculating the total size of buf
.