String

From Valve Developer Community
Revision as of 12:33, 12 August 2005 by Ts2do (talk | contribs) (Spellingz0rz!)
Jump to navigation Jump to search

Strings are extensions of the Character variables. Strings allow the storage of text in memory. A typical length limit for a string is 255 characters, but can be larger if necessary. However, larger strings use more memory, so the 255 character limit helps to better reserve and use memory for such common variables.

For localization purposes, modern software generally makes use of character encoding systems which may use more than one byte per character (see UTF-8 and UTF-16), so it is best to make use of the appropriate string-handling routines as provided by the system you are programming. While the need for, say, a Chinese or Russian translation may seem unnecessary at first, it it always a good practice to program without imposing arbitrary limits at an early stage.

Stub

This article or section is a stub. You can help by expanding it.