FindSubString(string, string)
Returns the position of sSubstring in sString.
int FindSubString( string sString, string sSubString );
Parameters
sString
sSubString
Description
Returns an integer value representing the position of sSubstring in sString. The search is case sensitive.
Returns a base zero index of where sSubstring starts in sString if found.
Returns -1 if sSubstring is not found to exist in sString.
Version
1.22
Example
//Example 1 - The following would return a value of 0. int nPostion = FindSubString("testing","test"); //Example 2 - The following would return a value of 1. int nPostion = FindSubString("testing","est"); //Example 3 - The following would return a value of -1. int nPostion = FindSubString("testing","mike"); //Example 4 - The following would return a value of -1. int nPostion = FindSubString("testing","Test");
See Also
functions: | GetStringLeft | GetStringLength | GetStringLowerCase | GetStringRight | GetStringUpperCase | TestStringAgainstPattern |
categories: | String Functions |
author: Brett Lathrope
Send comments on this topic.