|
Aegis
4.25.D505
|
#include <str.h>
Data Fields | |
| str_hash_ty | str_hash |
| string_ty * | str_next |
| long | str_references |
| size_t | str_length |
| char | str_text [1] |
The string_ty struct is used to remember information about strings. Users should always refer to strings as pointers. The only members within the struct that should be accessed are the str_text member, which is a NUL terminated array of characters, and the str_length member, which contains the length of the string's text (not including the NUL terminator).
It is guaranteed that all equal strings will not only have the same hash, but will, if fact, be exactly the same sting. The reference count is how many strings currently exist with this value. Thus, the commonest string test, a string equality test becomes a pointer equality test.
Thou shalt not modify any member of a string struct, or the forces of evil shall wreak misery in thy life.
| size_t string_ty::str_length |
The reference count for this string. It is guaranteed that all equal strings will not only have the same hash, but will, if fact, be exactly the same sting. The reference count is how many strings currently exist with this value. Used internally by the string table, users shall never access this member.
| char string_ty::str_text[1] |
1.7.6.1