Finding the Length of a String
The length of a string can be determined using the string-length
function. It accepts a single string and returns its length as an integer. Whitespace is significant, so leading and trailing whitespace characters are counted. Table 17-5 shows some examples.
Table 17-5. Examples of the string-length function
Example |
Return value |
---|---|
|
|
|
|
|
|
|
|
|
|
Get XQuery now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.