int strindex( string str, string substr )
strindex returns the numerical offset of a given string within another string. If the substr is not found, it returns -1.
printf("%d\n",strindex("xxxfooxxx","foo"));
Returns: "3"
printf("%d\n",strindex("xxxfooxxx","bar"));
Returns: "-1"
int strlen( string str )
strlen returns the length of the string, str.
printf("%d\n",strlen("foo"));
Returns: 3
string strsub ( string str, int start, int length )
strsub returns the substring of a given length starting at a given position in the string.
printf("%s\n",strsub("xxxfooxxx",3,3))
Returns "foo".
printf(%s\n",strsub(xxxfooxxx",3,-1))
-1 returns the remainder of the string, "fooxxx".
string subst ( string str, string pattern, string replacement )
subst substitutes part of a string with another string.
print(subst("xxxonexxx","one","two"));
Returns: "xxxtwoxxx"
© 2021 One Identity LLC. ALL RIGHTS RESERVED. Feedback Terms of Use Privacy