Siebel eScript Language Reference > C Language Library Reference > Clib String Methods >

Clib Search String for Not Character Set Method


The Clib Search String for Not Character Set method searches a string for a set of characters that is not part of the value that you specify in the charSet argument. It returns one of the following values:

  • If it finds all characters of the string that you specify in the charSet argument, then it returns the length of the string.
  • If it does not find all characters of the string that you specify in the string argument, then it returns the offset of the first character that is not a member of the character set that you specify in the charSet argument.
Format

Clib.strspn(string, charSet)

This method uses the same arguments as the Clib Search String for Character Set method. Usage is also the same. For more information, see the following topics:

Example

The following example searches for the value in the string argument, and then returns the position of w, counting from 0:

var string = "There is more than one way to swim.";
var rStrspn = Clib.strspn(string, " aeiouTthrsmn");
TheApplication().RaiseErrorText("strspn returns an integer: " + rStrspn);

This example provides the following results:

strspn returns an integer: 23

Siebel eScript Language Reference Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices.