String: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Spellingz0rz!)
mNo edit summary
Line 1: Line 1:
[[category:Variables]]
[[category:Variables]][[Category:Glossary]]
'''Strings''' are extensions of the [[Char]]acter [[variable]]s. '''Strings''' allow the storage of text in memory. A typical length limit for a '''string''' is 255 [[char]]acters, 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 [[variable]]s.
'''Strings''' are extensions of the [[Char]]acter [[variable]]s. '''Strings''' allow the storage of text in memory. A typical length limit for a '''string''' is 255 [[char]]acters, 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 [[variable]]s.



Revision as of 01:10, 30 August 2005

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.