Loading TOC...

MarkLogic Server 11.0 Product Documentation
fn:string-length

fn:string-length(
   [$sourceString as xs:string?]
) as xs:integer?

Summary

Returns an integer representing the length of the specified string. The length is 1-based, so a string that is one character long returns a value of 1.

Parameters
sourceString The string to calculate the length.

Example

fn:string-length("12345")

=> 5

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.