📄 testindex.pl
字号:
$string1="hello";
$string2="how are you hello world!";
$where1=index($string2,$string1);
#check out the string1 in the string2.
#The string1 is the main string and the string2 is the substring.
$where2=index($string2,$string1,23);
#The third param shows the position starting.
$where3=rindex($string2,"o");
#This function will give the exact position where the letter of 'o' appear during last time.
print "$where1\n","$where2\n","$where3\n";
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -