ZhangZhihui's Blog  

$>expr index 'abcdef' 'b'
2

$>expr index 'abcdef' 'be'
2

$>expr index 'abcdef' 'ca'
1

$>expr index 'abcdef' 'dq'
4

$>expr index 'abcdef' '12'
0

#index string character-list
#Return the first position in string that matches the first possible character in character-list. Continue through character-list until a match is found, or return 0.

posted on 2020-11-13 08:52  ZhangZhihuiAAA  阅读(560)  评论(0编辑  收藏  举报