Name
substring-before( )
Synopsis
string
substring-before(string s1, string s2
)
The substring-before()
function returns the substring of s1
that precedes the first occurrence of
the s2
in s1
, or it returns the empty string if
s1
does not contain s2
. For example, substring-before('Charming
cat'
, 'ing')
returns "Charm
“. The test is case-sensitive.
Nonstring objects may be passed to this function, in which case
they’re automatically converted to strings as if by the string( )
function.
Get XML in a Nutshell, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.