strIndexOf

C Styled Script
Reference Manual

<< Back  End  Next >>
 
 
INDEX
Introduction
Installation
Using The CSS Executive
Language
Directives
System Library
String Library
   strAscii
   strBuildRecord
   strCenter
   strChange
   strChar
   strExport
   strFormatNumber
   strImport
   strIndexOf
   strIsInteger
   strIsNumber
   strLeftJustify
   strLength
   strLower
   strParseRecord
   strRemoveWords
   strRightJustify
   strSplitConnectString
   strSplitPath
   strSpread
   strStrip
   strStripExtension
   strStripLeading
   strStripTrailing
   strSubString
   strUpper
   strWordCount
   strWords
Regular Expression Lib.
File Library
Database Library
C API
C++ API
CSS Links
  
strIndexOf(
  const string,    // string to search in
  const patt,      // pattern searched
  [const start])   // start position in string

Searches an occurrence of patt in string. If the pattern is found, the 1-based index of the first character is returned. If the pattern is not found, 0 is returned.

The optional start denotes the 1-based starting position in string.

Examples:

strIndexOf('hello world', 'o');     // 5
strIndexOf('hello world', 'o', 6);  // 8
strIndexOf('hello world', 'x');     // 0
 Copyright © IBK LandquartLast revised by Peter Koch, 24.02.00<< Back  Top  Next >>