String (computer Science)

String (computer Science)

In computer programming, a string is traditionally a sequence of characters, either as a literal constant or as some kind of variable. The latter may allow its elements to be mutated and/or the length changed, or it may be fixed (after creation). A string is generally understood as a data type and is often implemented as an array of bytes (or words) that stores a sequence of elements, typically characters, using some character encoding. A string may also denote more general array data types and/or other sequential data types and structures; terms such as string or string of <data types> are sometimes used to denote strings in which the stored data represents other data types.

Depending on programming language and/or precise data type used, a variable declared to be a string may either cause storage in memory to be statically allocated for a predetermined max length or employ dynamic allocation to allow it to hold chronologically variable number of elements.

When a string appears literally in source code, it is known as a string literal and has a representation that denotes it as such.

In formal languages, which are used in mathematical logic and theoretical computer science, a string is a finite sequence of symbols that are chosen from a set called an alphabet.

Read more about String (computer Science):  Formal Theory, String Datatypes, Text File Strings, Non-text Strings, String Processing Algorithms, Character String-oriented Languages and Utilities, Character String Functions

Other articles related to "string":

String (computer Science) - Character String Functions
... See also Comparison of programming languages string functions)String functions are used to manipulate a stringor change or edit the contents of a string ... They also are used to query information about a string ... The most basic example of a stringfunction is the length(string function,which returns the length of a string(not counting any terminator characters or any of the strings internal structural ...

Famous quotes containing the word string:

    The most perfect expression of human behavior is a string quartet.
    Jeffrey Tate (b. 1943)