![]() |
BlitzMax Extended
0.8.11
Pushing Blitz to the Max.
|
Fixed-length string object. More...
#include <blitz_string.h>
Data Fields | |
BBClass * | clas |
The class of the string. | |
int | refs |
The number of times an instance is currently used. | |
BBSize | length |
The length of the string. | |
BBChar | buf [] |
Contains the actual string data in UCS-2 encoding. |
Fixed-length string object.
In BlitzMax a string is a complex data type extending BBObject. That means it is usually handled by the GC and can be stored in BBObject
pointers for convenience.
All of the string's data is stored in a UCS-2 encoded BBChar
buffer. Therefore the length of the buffer equals the string's length.
It can be assumed that every string's class is the bbStringClass, since it's declared as a "Final Type" from the side of BlitzMax. Therefore every pointer of the type BBString*
can be used directly with the string functions, instead of looking up the right one in the virtual functions table (bbStringClass.vfns).
The class of the string.
Reimplemented from BBObject.
BBSize BBString::length |
The length of the string.
Since UCS-2 is used internally to store string data, this equals the number of BBChars stored in the buf property.
Referenced by bbStringAsc(), bbStringClone(), bbStringCompare(), bbStringConcat(), bbStringContains(), bbStringCount(), bbStringEndsWith(), bbStringEquals(), bbStringFind(), bbStringFindAll(), bbStringFindAny(), bbStringFindLast(), bbStringFromBytes(), bbStringFromChar(), bbStringFromInts(), bbStringFromShorts(), bbStringIsASCII(), bbStringIsLower(), bbStringIsUpper(), bbStringJoin(), bbStringNew(), bbStringPad(), bbStringReplace(), bbStringReverse(), bbStringSlice(), bbStringSplit(), bbStringStartsWith(), bbStringSub(), bbStringTimes(), bbStringToCString(), bbStringToInt(), bbStringToLong(), bbStringToLower(), bbStringToUpper(), bbStringToUTF8String(), bbStringToWString(), and bbStringTrim().
int BBString::refs |
The number of times an instance is currently used.
Reimplemented from BBObject.