Table 160 describes the arguments for the Clib Search String for Character Set

Table 160 describes the arguments for the clib search

This preview shows page 262 - 265 out of 334 pages.

Table 160 describes the arguments for the Clib Search String for Character Set method. Usage for the Clib Search String for Character Set Method The Clib Search String for Character Set method searches for characters starting at the beginning of the string that you specify in the string argument. Because the search is case-sensitive, 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. Table 160. Arguments for the Clib Search String for Character Set Method Argument Description string A literal string or a variable that contains the character set for which the this method searches. charSet A literal string or a variable that is the character set for which this method searches.
Image of page 262
C Language Library Reference Clib String Methods Siebel eScript Language Reference Version 8.1, Rev. A 263 Example The following example demonstrates the difference between Clib.strcspn and Clib.strpbrk: var string = "There's more than one way to climb a mountain."; var rStrpbrk = Clib.strpbrk(string, "dxb8w9k!"); var rStrcspn = Clib.strcspn(string, "dxb8w9k!"); TheApplication().RaiseErrorText("The string is: " + string + "\nstrpbrk returns a string: " + rStrpbrk + "\nstrcspn returns an integer: " + rStrcspn); This example provides the following results: The string is: There’s more than one way to climb a mountain. strpbrk returns a string: way to climb a mountain. strcspn returns an integer: 22 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: “Clib Search String for Character Set Method” on page 262 “Usage for the Clib Search String for Character Set Method” on page 262 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
Image of page 263
Siebel eScript Language Reference Version 8.1, Rev. A C Language Library Reference Clib String Methods 264 Clib Write Formatted String Method The Clib Write Formatted String method writes output to a string variable according to a format that you define. It returns one of the following values:
Image of page 264
Image of page 265

You've reached the end of your free preview.

Want to read all 334 pages?

  • Summer '16
  • Oracle
  • Type system, Siebel, Siebel eScript

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes