Loading TOC...

MarkLogic 12 EA 1 Product Documentation
fn:normalize-space

fn:normalize-space(
   [$input as xs:string?]
) as xs:string?

Summary

Returns the specified string with normalized whitespace, which strips off any leading or trailing whitespace and replaces any other sequences of more than one whitespace characters with a single space character (#x20).

Parameters
input The string from which to normalize whitespace.

Example

fn:normalize-space("
this
is
  a string
  ")

=> this is a string

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