summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/tests/string/find.asy
blob: cdf6dc6740fd0b7643ac7053ca5cc2872edaf1a8 (plain)
1
2
3
4
5
6
7
8
import TestLib;
StartTest("find");
string s = "abcdefab";
assert(find(s,"cd") == 2);
assert(find(s,"cd",3) == -1);
assert(find(s,"ab") == 0);
assert(find(s,"ab",1) == 6);
EndTest();