STRING::LENGTH
1g 2023 laplante@plcb.ca GOWEB — Get String Lengthtitle: “STRING::LENGTH” version: “1.0.0” date: 2023 author: “laplante@plcb.ca” section: “1g”
string::length Get String Length
string::length(expression[, error: bool, byte: bool])
length(expression[, error: bool, byte: bool])
The length
function returns the length of a string.
byte
parameter is set to true, it returns the length in bytes.true
, the function returns the length in bytes instead of characters.res={{
length("Hello"); "\n";
length("Héllo"); "\n"; // accented character counts as 1 char but 2 bytes
length("Héllo", , true); "\n"; // length in bytes
}}.
Returns:
res=5
5
6
laplante@plcb.ca