substring-after

substring-after 函式返回一個字串,該字串是給定字串在給定子字串之後的剩餘部分。

語法

substring-after( haystack, needle )

引數

haystack

要評估的字串。該字串的一部分將被返回。

needle

要搜尋的子字串。返回 haystackneedle 第一次出現之後的所有內容。

返回值

字串。

示例

XPath 示例 輸出
substring-after('aa-bb','-') bb
substring-after('aa-bb','a') a-bb
substring-after('aa-bb','b') b
substring-after('aa-bb','q') (空字串)

規範

XPath 1.0 4.2

Gecko 支援情況

支援。