Calculates string size in bytes. Will be inequal to the number of glyphs if the input string is UTF-8 encoded and contains non-ASCII characters.
length(string)
@/length(string)
Calculates string size in bytes. Will be inequal to the number of glyphs if the input string is UTF-8 encoded and contains non-ASCII characters.
node {
void evaluate(Context ctx) {
auto str = getValue<input_IN>(ctx);
emitValue<output_OUT>(ctx, length(str));
}
}
IN | OUT |
"" | 0 |
"lala" | 4 |
"I said: \"Hello, World!\"" | 23 |