C4 Engine Terathon Software C4 Engine API Documentation

• Utility Library

API Links
Developer Links

Text::ReadIdentifier

Defined in:  C4String.h
Reads an identifier from a character string.
Prototype

int32 ReadIdentifier(const char *text, char *identifier, int32 max);

Parameters
text A pointer to a character string.
identifier A pointer to a buffer that will receive the identifier string.
max The maximum length of a string that can be stored in the buffer specified by the identifier parameter.
Description
The ReadIdentifier function reads an identifier from the character string specified by the text parameter and returns the number of characters that were read. The characters composing the identifier are stored in the buffer specified by the identifier parameter. The maximum number of characters returned in this buffer is specified by the max parameter. The buffer specified by the identifier parameter should be large enough to hold max characters plus a zero terminator.

An identifier is made up of a sequence of consecutive characters from the set {0-9, A-Z, a-z, _, $}, that is, all uppercase and lowercase letters, all numbers, the underscore, and the dollar sign.
See Also

Text::ReadString

Text::GetWhitespaceLength