Bookshelf Home | Contents | Index | PDF | ![]() ![]() |
Siebel eScript Language Reference > Methods Reference > String Methods > Search String for Last Substring MethodThe Search String for Last Substring method searches the stringVar variable for the string that you specify in the substring argument. It returns the position of the last occurrence of this string in a string. If any of the following situations is true, then it returns a value of negative 1:
This method uses the same arguments as the Search String for Substring method. For more information, see Table 43. FormatstringVar.lastIndexOf(substring [, offset]) This method does the following according to how you specify the offset argument:
Example 1The 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"; Example 2The 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"; |
![]() |
![]() ![]() |
Siebel eScript Language Reference | Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |