Siebel eScript Language Reference > Siebel eScript Commands > The Clib Object String Methods >
This method searches a string for the first occurrence of a second string.
The string within which to search
The string to find
The string beginning at the first occurrence of findString in sourceString, continuing to the end of sourceString; otherwise, null, if findString is not found.
The following code:
function Test1_Click ()
var str = "We have to go to Haverford."
var substr = Clib.strstr(str, 'H');
TheApplication().RaiseErrorText("str = " + str + "\nsubstr = " +substr);
results in the following output:
str = We have to go to Haverford
substr = Haverford