Content deleted Content added
Undid revision 1248961429 by KibalchishTheCoder (talk): unecessary (linked before, or everyday language) |
|||
Line 58:
Strings are typically implemented as [[array data type|arrays]] of bytes, characters, or code units, in order to allow fast access to individual units or substrings—including characters when they have a fixed length. A few languages such as [[Haskell (programming language)|Haskell]] implement them as [[linked list]]s instead.
A lot of high-level languages provide strings as a primitive data type, such as [[Javascript]] and [[PHP]], while most others provide them as a composite data type, some with special language support in writing literals, for example, [[Java]] and [[C Sharp (programming language)|C#]].
Some languages, such as [[Prolog]] and [[Erlang (programming language)|Erlang]], avoid implementing a dedicated string datatype at all, instead adopting the convention of representing strings as lists of character codes.▼
▲Some languages, such as [[C (programming language)|C]], [[Prolog]] and [[Erlang (programming language)|Erlang]], avoid implementing a dedicated string datatype at all, instead adopting the convention of representing strings as lists of character codes. Even in programming languages having a dedicated string type, string can usually be iterated as a sequence character codes, like lists of integers or other values.
=== Representations ===
|