Skip to content

String (computing)

In computer programming, a string is traditionally a sequence of characters, either as a literal constant or as some kind of variable.

Core Idea

String (computing) is treated here as the recurring computerscienceandinformation identity summarized by this source-grounded definition: In computer programming, a string is traditionally a sequence of characters, either as a literal constant or as some kind of variable. 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 the length changed, or it may be fixed (after creation).

How would you explain it like I'm…

Letter Beads

A string is how a computer keeps words and sentences. It is like beads on a necklace, where each bead is a letter, a number, a space, or a symbol, all in order. Your name, saved in a computer, is a string.

A Line of Characters

In programming, a string is a sequence of characters, such as letters, digits, spaces, and punctuation, kept in order. A string can be written directly in a program, like "hello", or stored in a variable. Some strings can be changed or made longer after they are created, and some stay fixed. Inside the computer, a string is usually stored as a row of numbers, where a code says which number means which character.

Character Sequence

A string is traditionally a sequence of characters, used either as a literal constant written directly in source code (a string literal) or as a variable. Depending on the language and type, a string variable may be mutable, allowing characters and length to change, or fixed once created. Strings are often stored as arrays of bytes or larger words, using a character encoding to map characters to numbers. Some languages reserve a fixed maximum amount of memory for a string, while others grow and shrink it dynamically. More broadly, 'string' can mean any sequence of data elements, not just characters.

 

In computer programming, a string is traditionally a sequence of characters, appearing either as a literal constant or as a variable. A string appearing literally in source code is a string literal or anonymous string. As a variable, it may permit mutation of its elements and changes of length, or be immutable after creation. Implementations commonly use an array of bytes or words storing the elements, typically characters, under some character encoding. Storage may be statically allocated for a predetermined maximum length or dynamically allocated to hold a variable number of elements, depending on the language and data type. In a more general sense, the term can denote a sequence or list of data other than characters.

Scope of Application

  • Non-text strings. This data may or may not be represented by a string-specific datatype, depending on the needs of the application, the desire of the programmer, and the capabilities of the programming language.

  • Character string functions. String functions are used to create strings or change the contents of a mutable string.

  • Purpose. A primary purpose of strings is to store human-readable text, like words and sentences.

  • Purpose. Strings are used to communicate information from a computer program to the user of the program.

  • Purpose. Often these are intended to be somewhat human-readable, though their primary purpose is to communicate to computers.

Clarity

A clear use of String (computing) names the carrier, the operative relation, and the conditions under which the source treats the identity as present. The minimal definition is In computer programming, a string is traditionally a sequence of characters, either as a literal constant or as some kind of variable.

Manages Complexity

String (computing) compresses multiple computerscienceandinformation details into a stable diagnostic relation. The source shows both the central mechanism—the name stringology was coined in 1984 by computer scientist Zvi Galil for the theory of algorithms and data structures used for string processing.—and the practical consequence—the string length can be stored as a separate integer (which may put another artificial limit on the length) or implicitly through a termination.

Abstract Reasoning

  1. Type the carrier. Identify the computerscienceandinformation entities to which the claim applies.
  2. State the relation. Use the source-grounded identity: In computer programming, a string is traditionally a sequence of characters, either as a literal constant or as some kind of variable.
  3. Check operation and conditions. Sammet, "the first realistic string handling and pattern matching language" for computers was COMIT in the 1950s, followed by the SNOBOL language of the early 1960s.
  4. Demand recognition evidence.

Knowledge Transfer

Within the home domain. Knowledge about String (computing) transfers literally when a new case preserves the same carrier type, relation, and recognition test. This data may or may not be represented by a string-specific datatype, depending on the needs of the application, the desire of the programmer, and the capabilities of the programming language being used. String functions are used to create strings or change the contents of a mutable string. Beyond the home domain. No canonical parent is asserted for String (computing).

Relationships to Other Abstractions

Local relationship map for String (computing)Parents appear above the current abstraction, mutual partners to the right, and children below. Node labels state whether each abstraction is prime or domain-specific; colors identify relation types.String (computing)DOMAINDomain-specific abstraction: Data Type — is a kind ofData TypeDOMAIN

Current abstraction String (computing) Domain-specific

Parents (1) — outgoing typed relations

  • String (computing) is a kind of Data Type Domain-specific

    String (computing) satisfies the defining boundary of Data Type: A data type is a specification of a class of values together with their representation or abstract behavior, admissible operations, invariants, equality and error conventions, and static or dynamic rules governing storage, construction, use, and composition in a computational system.

Hierarchy path (1) — routes to 1 parentless root

Neighborhood in Abstraction Space

String (computing) sits in a sparse region of the domain-specific corpus (61st percentile for distinctiveness): few abstractions share its structure, so a faithful description tends to retrieve it precisely.

Family — Formal Logic & Language Constructs (20 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-11-14