Difference between revisions of "FindSubString"

From Dragon Age Toolset Wiki
Jump to: navigation, search
(Generated by Sunjammer's Dragon Age Script Paser)
m
Line 1: Line 1:
{{Generated}}
 
 
{{dafunction
 
{{dafunction
 
|name=FindSubString
 
|name=FindSubString

Revision as of 23:06, 5 October 2009

Returns the position of a substring within a string.

int FindSubString(
string sString,
string sSubString,
int nStart = 0
);
Parameters:
sString
The string to search
sSubString
The substring to search for
nStart
The position to start the search from
Returns:

Returns the position of the substring, returns -1 on error.

Source:

script.ldf

Description

Returns the starting index of the first occurence of the substring sSubstring within the string sString beginning at position nStart. Returns -1 if the string sSubstring does not occur in the string sString after position nStart. The result is 0 indexed, meaning this function will return 0 if the substring occurs at the very beginning of the string.