strLastIndexOf

C Scripting Language
Reference Manual
Version 4.4.0

<< Back  End  Next >>
 
 
INDEX
Introduction
Installation
Using the CSL executive
Language
Directives
System library
String library
   strAscii
   strBuildRecord
   strCenter
   strChange
   strChar
   strExport
   strFormatNumber
   strImport
   strIndexOf
   strIsInteger
   strIsNumber
   strLastIndexOf
   strLeftJustify
   strLength
   strLower
   strParseRecord
   strRemoveWords
   strRightJustify
   strSplitConnectString
   strSplitPath
   strSpread
   strStrip
   strStripExtension
   strStripLeading
   strStripTrailing
   strSubString
   strUpper
   strWordCount
   strWords
Math library
Regular expression lib.
File library
Database library
Async Communication
Registry/Profile handling
Windows control
C API
C++ Class Interface
CSL links
  
strLastIndexOf(
  const string,       // string to search in
  const patt,         // pattern searched
  [const start,       // start position in string (default=MAXLONG)
   const ignorecase]) // case independent search (default=false)

Searches an occurrence of patt in string starting at end of string and going to the beginning. If the pattern is found, the 1-based index of the first character is returned. If the pattern is not found, 0 is returned.

Examples:

strLastIndexOf('hello world', 'o');     // 8
strLastIndexOf('hello world', 'o', 6);  // 5
strLastIndexOf('hello world', 'x');     // 0
  Copyright © IBK Landquart Last revision: 27.05.2002 << Back  Top  Next >>