Loading TOC...

MarkLogic Server 11.0 Product Documentation
fn.substring

fn.substring(
   sourceString as String?,
   startingLoc as Number,
   [length as Number]
) as String?

Summary

Returns a substring starting from the $startingLoc and continuing for $length characters.

Parameters
sourceString The string from which to create a substring.
startingLoc The number of characters from the start of the $sourceString.
length The number of characters beyond the $startingLoc.

Example

fn.substring("123456", 2, 2);

=> "23"

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