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') (空字串)

規範

Gecko 支援

支援。