In computer programming, a string is a value made up of an ordered sequence of characters, used to represent text such as a word, a sentence or any other run of human-readable or symbolic data a program needs to store or process. A string can be a literal value written directly into a program's source code, or it can be held in a variable and built, searched or modified while the program runs, and depending on the language it may allow its length and contents to change or may instead stay fixed once created. Internally a string is often implemented as an array of bytes holding a sequence of elements, typically characters encoded under some character encoding scheme, though the underlying representation differs across programming languages while the concept of an ordered run of characters stays constant.
Facts
Core PrincipleA string is often implemented as an array data structure of bytes that stores a sequence of elements, typically characters, using some character encoding. 1 Sources
1. String (Computer Science) (Wikipedia)
Lead summaryQuote, Lead summary
A string is often implemented as an array data structure of bytes that stores a sequence of elements, typically characters, using some character encoding.
View the Source Reader Challenges (0)
No disputes yet. Spotted an error or a better source? Open the first one.
Sign in to dispute this or suggest a correction.