Siebel eScript Language Reference > Siebel eScript Commands > Clib Object String Methods >
Clib.strstri() Method
This method performs a case-insensitive search in a string for the first occurrence of a specified substring. Syntax
Clib.strstri(sourceString, findString)
|
|
sourceString |
The string within which to search |
findString |
The string to find |
Returns
The string beginning at the first occurrence of findString in sourceString, continuing to the end of sourceString; otherwise, null if findString is not found. Usage
This is a case-insensitive version of the substring() method. Compare the result with that shown in the Clib.strstr() Method. Example
The following code: function Test_Click () { var str = "We have to go to Haverford." var substr = Clib.strstri(str, 'H'); TheApplication().RaiseErrorText("str = " + str + "\nsubstr = " +substr); }
results in the following output: str = We have to go to Haverford. substr = have to go to Haverford.
See Also
Clib.strstr() Method String replace() Method
|