GetStringRight(string, int)
From NWN Lexicon
Jump to navigationJump to search
Gets a substring from within a string.
string GetStringRight(
string sString,
int nCount
);
Parameters
- sString
- Target string.
- nCount
- Length of substring.
Description
Returns a substring containing nCount characters from the right side of sString. Returns an empty string on error.
Remarks
A negative value for nCount is considered invalid and an empty string will be returned.
Version
1.22
Example
void main()
{
// say "World!"
string sMessage = "Hello World!";
SpeakString(GetStringRight(sMessage, 6));
}
See Also
| functions: | GetSubString, GetStringLeft |
author: Kristian Markon, editor: Daniel Beckman