Difference between revisions of "FindSubString"

From Dragon Age Toolset Wiki
Jump to: navigation, search
m
 
Line 33: Line 33:
 
<!-- This section contains examples transcluded from the snippet library. -->
 
<!-- This section contains examples transcluded from the snippet library. -->
  
<!-- == See also == -->
+
== See also ==
 
<!-- This section contains links to articles, functions or constant groups. -->
 
<!-- This section contains links to articles, functions or constant groups. -->
 +
 +
[[UT FindSubString]]
  
 
[[Category: String functions]]
 
[[Category: String functions]]

Latest revision as of 22:17, 10 February 2010

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.


See also

UT FindSubString