

While strings can be used to hold many types of symbols, letter, and numbers, in many cases the content that can be used to fill a specific string may be limited. Virtually all of the text you read on the web is stored as a string in a database server somewhere. Websites use strings to store things like usernames, encrypted passwords, and the text content of a blog post.


For example, the string “Mary had a little lamb” is stored exactly as it is typed, and a search for the string “lamb little Mary” would not find the stored string unless an advanced algorithm, such as those used by search engines, was used to find partial matches. Strings are stored in a specific sequence. However, if a variable is assigned the value “2”, that value would be stored as a text string, and could not be used to perform calculations. For example, in JavaScript, if a variable is assigned the value 2, that value would be stored as an integer, and could be used to perform calculations. Strings are stored as text, even if they contain numbers. In most programming languages, pieces of data are recognized as strings when surrounded by quotation marks. In computer programming, a string is a type of data that may contain letters, numbers, and symbols, and that is stored as a sequence of text. 2.3 How are strings used to locate information?.2.1 What letters, symbols, and numbers can a string include?.
