描述:
查找母串中子串的位置
语法:
pos(s1, s2{, begin})
备注:
查找母串s1中起始位置为begin的子串s2的位置,找不到返回null。
参数:
|
s1 |
待查找子串的母串 |
|
s2 |
被查找的子串 |
|
begin |
查找的起始位置,缺省为1 |
返回值:
整型
选项:
|
@z |
由begin开始往前查找,缺省从begin开始往后查找 |
示例:
|
pos("abcdef","def") |
4 |
|
pos("abcdefdef","def",5) |
7 |
|
pos("abcdef","defa") |
(null) |
|
pos@z("abcdeffdef","def",7) |
4 |
|
pos("abcdeffdef","def",7) |
8 |