Return length of string value.
The following construct(s) refer to this construct:
fn:string-length(string? $string) => integer?
This function returns the length of the value of $string
as
integer value. If the value of $string
is the empty sequence, the
empty sequence is returned.
$string |
string value |
---|
string-length("Donaudampfschiffahrtskapitänsabzeichen")
string-length(normalize-space(" "))
The first function call returns 38, the second zero, since the string value is a zero-length string after normalizing whitespace.