GetStringRight(string, int)

From NWN Lexicon

Gets a substring from within a string.

string GetStringRight(
    string sString,
    int nCount
);

Contents

[edit] Parameters

sString
Target string.
nCount
Length of substring.

[edit] Description

Returns a substring containing nCount characters from the right side of sString. Returns an empty string on error.

[edit] Remarks

A negative value for nCount is considered invalid and an empty string will be returned.

[edit] Version

1.22

[edit] Example

void main()
{
    // say "World!"
    string sMessage = "Hello World!";
    SpeakString(GetStringRight(sMessage, 6));
}

[edit] See Also

functions:  GetSubString, GetStringLeft


 author: Kristian Markon, editor: Daniel Beckman

Personal tools
Categories