C4 Engine
C4 Engine API Documentation

Data::GetWhitespaceLength

Defined in:  TSData.h
Returns the number of whitespace characters at the beginning of a text string.
Prototype

int32 GetWhitespaceLength(const char *text);

Parameters
text A pointer to a text string.
Description
The GetWhitespaceLength function returns the number of whitespace characters at the beginning of the text string specified by the text parameter. All characters having an ASCII value between 1 and 32, inclusive, are considered whitespace by this function.

The GetWhitespaceLength function also treats comments as whitespace. If this function encounters two consecutive forward slashes, then it treats all of the characters between the slashes and the next newline character as a comment. If this function encounters a forward slash followed by an asterisk, then all of the characters between that occurrence and the next atserisk followed by a forward slash are treated as a comment. That is, all C++ style comments are considered to be whitespace using the same rules as in C++.
See Also

Data::ReadIdentifier