x3_inc_string

From NWN Lexicon
Jump to: navigation, search

This file contains several useful string processing functions. Utilized extensively by the v1.69 horse system scripts.

Information icon.png This article is a stub. You can help the NWN Lexicon by expanding it.
Reason: this article is incomplete or lacking detail.

Constants

Name Value Description
STRING_COLOR_BLACK "000"
RGB color encoded string constant used to represent the color black.
STRING_COLOR_BLUE "007"
RGB color encoded string constant used to represent the color blue.
STRING_COLOR_GREEN "070"
RGB color encoded string constant used to represent the color green.
STRING_COLOR_PINK "755"
RGB color encoded string constant used to represent the color pink.
STRING_COLOR_RED "700"
RGB color encoded string constant used to represent the color red.
STRING_COLOR_ROSE "744"
RGB color encoded string constant used to represent the color rose.
STRING_COLOR_WHITE "777"
RGB color encoded string constant used to represent the color white.



Functions

Name Description

StringParse

Given a source string and a delimiter string, this function searches the source string for the delimiter string and returns the portion of the source string that appears either left of the first occurrence of the delimiter, or right of the last occurrence of the delimiter.

StringRemoveParsed

Given a source string, a parse string, and a delimiter string, this function returns the result of removing the leftmost (or rightmost) characters from the source string equaling the length of the parse string to include any trailing (or leading) delimiters found beyond (or before) that point.

StringReplace

Given a source string, search string, and replacement string, this function returns the result of replacing every occurrence of the search string found in the source string with the replacement string.

StringToRGBString

Given a string and an RGB color encoded string, this function returns an equivalent string that will display in the specified color.




author: Axe Murderer, editors: Mistress, Kolyana