Also used to find the first position in String1 that its substring String2 begins. In this case, String1 and String2 are strings and Position is a variable.
String positions must be positive and start at 1.
Success: substring("str","st",1). substring("abcabcabc","bc",X) (gives X=2). substring("abcabcabc","bc",8). substring("abc","",X). (gives X=1). substring("abc","",2). Fail: substring("astring","strg",2). substring("","a",X). Error: substring(S,"str",1). (Error 4). substring('str',S,1). (Error 5). substring("st","s",1.0). (Error 5). substring("ab","a",-2). (Error 6).