Methods Reference String Methods Siebel eScript Language Reference Version 81

Methods reference string methods siebel escript

This preview shows page 103 - 105 out of 334 pages.

Methods Reference String Methods Siebel eScript Language Reference Version 8.1, Rev. A 103 You do not specify the offset argument. It returns the rightmost position in the entire string at which the substring begins. Example 1 The following example returns the position of the last occurrence of the a character in the string. It returns a value of 5: var string = "what a string"; string.lastIndexOf("a") Example 2 The following example returns the position of the last occurrence of the abr string, beginning at a position that is not greater than 8. It returns a value of 7: var magicWord = "abracadabra"; var lastabr = magicWord.lastIndexOf("abr", 8); Search StringVar for Regular Expression Method The Search StringVar for Regular Expression method searches a string for a regular expression. It returns one of the following: If it finds the regular expression, then it returns the position of this regular expression. If it does not find the regular expression, then it returns negative 1. You can run this method in server script or browser script. This method uses the same argument as the Get Regular Expression From StringVar method. For more information, see Table 39 on page 95 . Format stringVar .search( regexp ) Example The following example uses the Search StringVar for Regular Expression method: function Test(sValue) { //Validate for 5 digit numbers var sCheck = /^\d{5}$/; //regular expression defining a 5 digit number if(sValue.search(sCheck)==0) { return("Valid"); } else {
Image of page 103
Siebel eScript Language Reference Version 8.1, Rev. A Methods Reference BLOB Methods 104 return("Invalid"); } } BLOB Methods This topic includes the following topics: “About the BLOB Descriptor” on page 104 “Get BLOB Data Method” on page 106 “Get BLOB Size Method” on page 107 “Write BLOB Data Method” on page 108 About the BLOB Descriptor The blobDescriptor object describes the structure of a BLOB (binary large object). If you must configure Siebel CRM to send an object to a process other than the Siebel eScript interpreter, such as to a Windows API function, then you must configure it to create a blobDescriptor object that describes the order and type of data of this object. This description describes how to store the properties of the object in memory. You use it with methods such as the Siebel Library Call DLL method or the Clib Read From File method. For more information, see “Siebel Library Call DLL Method” on page 204 and “Clib Read From File Method” on page 243 . A BLOB descriptor includes the same data properties as the object it describes. You must set a value for each property that specifies how much memory is required to store the data that the property holds. To refer to the arguments passed to the constructor function, you use the following keyword: this You can think of this keyword conceptually as this object . Consider the following object: Rectangle(width, height) { this.width = width; this.height = height; } To configure Siebel eScript to pass data to the following items, you typically use a BLOB descriptor: Siebel eScript data structure, which is similar to JavaScript
Image of page 104
Image of page 105

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