String: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 3: Line 3:


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.
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.
A common method for storing variable length strings is [[String Zero]].


{{stub}}
{{stub}}

Revision as of 21:42, 19 October 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.

A common method for storing variable length strings is String Zero.

Stub

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