int match( string regularexpr, string str )
match compares a string to a regular expression.
Returns true if a match is found; otherwise, false.
# check if user begins with j and ends with t… if (match("^j.*t$", user) ) { … }
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".
© 2021 One Identity LLC. ALL RIGHTS RESERVED. Feedback Terms of Use Privacy