Background for Skyrim SE
Member of the StringUtil script
stringfunctionGetNthChar(strings, intindex)NativeGlobal

Description

Wiki Description

Returns the character at the given index in the given string. (This function requires SKSE)

Documentation Comment

returns a single character string with the character at index


Caveats

CK Wiki - Notes


Parameters

strings

CK Wiki Description

The string to search in.

intindex

CK Wiki Description

The index of the character in the string.


Examples

string posInString = StringUtil.getNthChar("Hello, World!", 4)
debug.notification("Character at position 4 in the given string is " + posInString + ".")
debug.trace("Character at position 4 in the given string is <" + posInString + ">.")
; Character at position 4 in the given string is <O>.
import StringUtil
;;;
string posInString = getNthChar("01234567", 5)
int x = posInString as int
debug.notification(2 * x)
; 10

Auto-Generated Example

string myString__s
int myInt__index

string returnedValue = StringUtil.GetNthChar(myString__s, myInt__index)

Related Pages


Additional References

View this function’s page on the Skyrim Creation Kit Wiki

Some data provided by the Skyrim Creation Kit Wiki. Licensed under the Creative Commons Attribution-ShareAlike license.