X0 i0 stringlib

From NWN Lexicon



Contents

[edit] x0_i0_stringlib

Library of general string-manipulation functions for convenience.

[edit] Constants

Name Value Brief Description
DELIM_NOT_FOUND -1


[edit] Structures

Name Variables Brief Description
sStringTokenizer int nRemainingLen

string sOrig

string sRemaining

string sDelim

string sLastTok

INTERNAL: Length of the remaining part of the string to be tokenized.

Original string that is being tokenized.

INTERNAL: Remaining substring to be tokenized.

Delimiter used to split the string up into tokens.

INTERNAL: Last token determined by AdvanceToNextToken .


[edit] Functions

Name Brief Description

AdvanceToNextToken

Advance the tokenizer to the next token.

GetNextToken

Return the next token as determined by AdvanceToNextToken.

GetNumberTokens

Return the number of tokens in the string for the specified delimiter.

GetStringTokenizer

Create and return a string tokenizer for a given string with a specified delimiter.

GetTokenByPosition

Return the i'th token in the string for the specified delimiter. The first token is at position i=0, the second at i=1, etc.

HasMoreTokens

Check to see if any more tokens remain. Returns FALSE if not, TRUE if so.



  authors: Mistress, motu99, editor: Kolyana

Personal tools
Categories