Bookshelf Home | Contents | Index | PDF |
Siebel eScript Language Reference > C Language Library Reference > Clib String Methods > Clib Search String for Character Set MethodThe Clib Search String for Character Set method searches a string for a set of characters that you specify in the charSet argument. It returns one of the following values:
FormatClib.strcspn(string, charSet) Clib.strcspn is similar to Clib.strpbrk, except that Clib.strpbrk returns the set that begins at the first character found while Clib.strcspn returns the offset number for that character. Table 159 describes the arguments for the Clib Search String for Character Set method. Usage for the Clib Search String for Character Set MethodThe Clib Search String for Character Set method searches for characters starting at the beginning of the string that you specify in the string argument. The search is case-sensitive, so you must use uppercase and lowercase characters in the charSet argument. It is recommended that you use the Clib Search String for Character Set Method method only if you cannot use the equivalent standard JavaScript method. ExampleThe following example demonstrates the difference between Clib.strcspn and Clib.strpbrk: var string = "There's more than one way to climb a mountain."; This example provides the following results: The string is: There's more than one way to climb a mountain. |
Siebel eScript Language Reference | Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |