String (computer science): Difference between revisions

Content deleted Content added
mNo edit summary
Tags: Reverted Visual edit
top: "string" does not go to this page
Line 1:
{{Short description|Sequence of characters, data type}}
{{more citations needed|date=March 2015}}
{{For|instrumental strings|String (music)}}{{For|the concept in quantum physics|String theory|String (physics)}}[[File:String example.png|alt=Diagram of String data in computing. Shows the word "example" with each letter in a separate box. The word "String" is above, referring to the entire sentence. The label "Character" is below and points to an individual box.|thumb|Strings are typically made up of [[character (computing)|characters]], and are often used to store human-readable data, such as words or sentences.]]
 
In [[computer programming]], a '''string''' is traditionally a [[sequence]] of [[character (computing)|characters]], either as a [[literal (computer programming)|literal constant]] or as some kind of [[Variable (computer science)|variable]]. The latter may allow its elements to be [[Immutable object|mutated]] and the length changed, or it may be fixed (after creation). A string is generally considered as a [[data type]] and is often implemented as an [[array data structure]] of [[byte]]s (or [[word (computer architecture)|word]]s) that stores a sequence of elements, typically characters, using some [[character encoding]]. ''String'' may also denote more general [[Array data type|arrays]] or other sequence (or [[List (abstract data type)|list]]) data types and structures.