Difference between revisions of "Quake c string"

From QuakeQEWiki
Jump to navigation Jump to search
Line 13: Line 13:
|"
|"
|-
|-
|
|\0
|
|unknown
|}
|}
The 2021 release uses curly-braces as a delimiter/replacement shorthand
The 2021 release uses curly-braces as a delimiter/replacement shorthand
Line 28: Line 28:


[[vtos]] creates a string representation of a vector
[[vtos]] creates a string representation of a vector
[[Category:Primitive]]

Revision as of 06:27, 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