Clib Copy String Method The Clib Copy String method copies characters from one

Clib copy string method the clib copy string method

This preview shows page 257 - 259 out of 334 pages.

Clib Copy String Method The Clib Copy String method copies characters from one string to another string. It returns the ASCII code of the first character of the string that you specify in the destString argument. You can copy from one part of a string to another part of the same string. Format Clib.strncpy( destString, sourceString, maxLen ) This method uses the same arguments as the Clib Append String method. For more information, see “Clib Append String Method” on page 255 . Note the following differences that the Clib Copy String method performs: Table 154. Arguments for the Clib Compare Strings Method Argument Description string1 A string or a variable that contains a string that this method compares against the string that the string2 argument contains. string2 A string or a variable that contains a string that this method compares against the string that the string1 argument contains. maxLen The number of bytes to compare. Table 155. Arguments for the Clib Convert String to Lowercase Method Argument Description str The string that this method changes to lowercase.
Image of page 257
Siebel eScript Language Reference Version 8.1, Rev. A C Language Library Reference Clib String Methods 258 The number of characters it copies is the lesser of the value of the maxLen argument and the length of the sourceString argument. If the value that the MaxLen argument contains is greater than the length of the value that the sourceString argument contains, then it fills the remainder of the destination string with null bytes. If the string you specify in the destString argument is not defined, then it defines this string. Clib Get Formatted String Method The Clib Get Formatted String method returns a formatted string as a numeric literal or as an argument. If you use this method to format a floating point number to a specific number of decimal points, then it returns the value rounded to the number of decimal points that you specify. For example, if you use the following code to format the num argument, then it returns the num argument rounded to 2 decimal points: Clib.rsprintf(“%.2f”, num) Format Clib.rsprintf([ formatString ] [,v ar1, var2, ... , var n]) Table 156 describes the arguments for the Clib Get Formatted String method. Example Each of the following code lines includes an example of using the Clib Get Formatted String method followed by the resulting string: var TempStr = Clib.rsprintf("I count: %d %d %d.",1,2,3) //"I count: 1 2 3" var a = 1; var b = 2; TempStr = Clib.rsprintf("%d %d %d",a, b, a+b) //"1 2 3" Table 156. Arguments for the Clib Get Formatted String Method Argument Description formatString A string that includes character combinations that describe how to treat arguments. For more information on the format strings you can use with this method, see “Format Characters for Methods That Print and Scan” on page 233 .
Image of page 258
Image of page 259

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

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors