The substring-before
function returns a string that is the rest of a given string before a given substring.
substring-before( haystack , needle )
haystack
needle
needle
in haystack
will be returned. A string.
XPath Example | Output |
---|---|
substring-before('aa-bb','-') | aa |
substring-before('aa-bb','a') | (empty string) |
substring-before('aa-bb','b') | aa- |
substring-before('aa-bb','q') | (empty string) |
Supported.
© 2005–2017 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/XPath/Functions/substring-before