STRING::LENGTH 1g 2023 laplante@plcb.ca GOWEB — Get String Length


title: “STRING::LENGTH” version: “1.0.0” date: 2023 author: “laplante@plcb.ca” section: “1g”

category: “GOWEB/STRING”

Name

string::length Get String Length

Synopsis

string::length(expression[, error: bool, byte: bool])
length(expression[, error: bool, byte: bool])

Description

The length function returns the length of a string.


Parameters


Examples

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

Author

laplante@plcb.ca

See Also


Version