Difference between revisions of "Quake c string"

From QuakeQEWiki
Jump to navigation Jump to search
Line 15: Line 15:
|\0
|\0
|unknown
|unknown
|-
|<nowiki>{{</nowiki>
|{
|-
|<nowiki> }}</nowiki>
| }
|}
|}
The 2021 release uses curly-braces as a delimiter/replacement shorthand
The 2021 release uses curly-braces as a delimiter/replacement shorthand

Revision as of 06:28, 17 February 2022

Quake C strings are one of the primitive types of Quake C. They are zero-terminated sequences of characters. Vanilla quake c offers no straightforward ways to modify a string once it is created and no way to combine existing strings into a new string.

Much like the C programming language, strings in QuakeC have escape characters:

character result
\n new line
\" "
\0 unknown
{{ {
}} }

The 2021 release uses curly-braces as a delimiter/replacement shorthand

Searching through the existing entities in the world of quake can be done by strings

Strings can be printed/output to screen with a number of different methods

file paths are strings

see also:

ftos creates a string from a floating point number

vtos creates a string representation of a vector