Background for Skyrim SE
Member of the DbMiscFunctions script
intfunctionfindNthInstanceInString(strings, stringtoFind, intnthInstance=-1, intstartIndex=0)Global

Description

Documentation Comment

find the index of the nth instance of string toFind in string s
if nthInstance == -1 (default), finds the last instance in string s
requires skse


Caveats


Parameters

strings

stringtoFind

intnthInstance=-1

intstartIndex=0


Examples

Auto-Generated Example

string myString__s
string myString__toFind
int myInt__nthInstance
int myInt__startIndex

int returnedValue = DbMiscFunctions.findNthInstanceInString(myString__s, myString__toFind, myInt__nthInstance, myInt__startIndex)
Some data provided by the Skyrim Creation Kit Wiki. Licensed under the Creative Commons Attribution-ShareAlike license.