A string literal is the representation of a string value within the source code of a computer program. There are numerous alternate notations for specifying string literals, and the exact notation depends on the individual programming language in question. Nevertheless, there are some general guidelines that most modern programming languages follow.
Specifically, most string literals can be specified using:
- declarative notation;
- whitespace delimiters (indentation);
- bracketed delimiters (quoting);
- escape characters; or
- a combination of some or all of the above
Read more about String Literal: Declarative Notation, Whitespace Delimiters, Bracketed Delimiters, Delimiter Collision, Metacharacters, Variable Interpolation, Binary and Hexadecimal Strings, Embedding Source Code in String Literals
Famous quotes containing the words string and/or literal:
“First you find a little thread, a little thread leads you to a string, and the string leads you to a rope. And from the rope you hang by the ... neck.”
—A.I. (Albert Isaac)
“All the sweetness of religion is conveyed to children by the hands of storytellers and image-makers. Without their fictions the truths of religion would for the multitude be neither intelligible nor even apprehensible; and the prophets would prophesy and the philosophers celebrate in vain. And nothing stands between the people and the fictions except the silly falsehood that the fictions are literal truths, and that there is nothing in religion but fiction.”
—George Bernard Shaw (18561950)