home contribute faq download

FunctX XSLT Functions

fn:string-length

The length of a string

Google
Webdatypic.com

Description

The fn:string-length function returns an xs:integer value indicating the number of characters in the string. Whitespace is significant, so leading and trailing whitespace characters are counted.

This description is © Copyright 2007, Priscilla Walmsley. It is excerpted from the book XQuery by Priscilla Walmsley, O'Reilly, 2007. For a complete explanation of this function, please refer to Appendix A of the book.

Arguments and Return Type

NameType
$arg xs:string?
return value xs:integer

Examples

XPath ExampleResults
string-length('query')
5
string-length('  query  ')
9
string-length(normalize-space('  query  '))
5
string-length('xml query')
9
string-length('')
0
string-length(())
0

See Also

functx:max-line-lengthThe maximum line length

History

Published OnLast UpdatedContributor(s)
2006-06-272007-02-26W3C, XQuery 1.0 and XPath 2.0 Functions and Operators, http://www.w3.org/TR/xpath-functions/
Datypic XSLT Services

Recommended Reading:

XQuery