Bookshelf Home | Contents | Index | PDF |
Siebel eScript Language Reference > Siebel eScript Commands > The Clib Object String Methods > Clib.strchr() MethodThis method searches a string for a specified character. SyntaxReturnsThe offset from the beginning of string of the first occurrence of char in string; otherwise, null if char is not found in string. The return value is zero-based. The first character is zero, the second is 1, and so on. UsageThis method searches the parameter string for the character char. When possible, you should use the standard JavaScript method substring() (read string.replace() Method). Examplevar str = "I can't stand soggy cereal." results in the following output. I can't stand soggy cereal. See AlsoClib.strcspn() Method |
Siebel eScript Language Reference |