String (computer science): Difference between revisions

Content deleted Content added
Drj (talk | contribs)
clarified details of representation, linked to string processing languages
No edit summary
Line 1:
A string has special connotations in the world of [[computing]]. is Aan genericimportant name for a [[datatype]] commonly found in many [[programming language|programming languages]] to represent text. The exact semantics of the datatype vary from language to language but it usually has the core semantics of represented a finite ordered sequence of [[character]]s (a group a characters "strung" together, hence the name). It may also refer to strings of other datatypes other than characters (such as strings of numbers or vectors).
In the [[theory of computation]] strings are also often called words, and the letters are elements from an arbitrary finite set.
 
=== Representations ==
Line 14 ⟶ 15:
The above example is how "FRANK" would look in a 10 byte NUL terminated string. Characters after the 0 do not form part of the representation.
 
Of course, other representations are possible. Using [[tree]]s and [[list]]s would make it easier to insert characters in the middle of the string.
 
=== String Processing ===
Line 25 ⟶ 26:
* [[sed]]
 
Many [[UNIX]] utilities perform simple string manipulations and can be used to easily program some powerful string processing algorithms. Files and finite streams may be viewed as strings.
----
/Talk