Description
The functx:line-count function counts the number of lines in a string, using the carriage return and newline characters to indicate the end of a line.
Arguments and Return TypeName | Type | Description |
$arg |
xs:string? |
the string to test |
return value |
xs:integer |
XQuery Function DeclarationSee XSLT definition. | declare namespace functx = "http://www.functx.com";
declare function functx:line-count
( $arg as xs:string? ) as xs:integer {
count(functx:lines($arg))
} ; |
Exampleslet $lines := | 'a
value
on
many
lines' | return |
XQuery Example | Results |
---|
functx:line-count('a value') |
1 |
functx:line-count($lines) |
5 |
Depends OnSee AlsoHistory |
Recommended Reading: 
|