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:
“The most perfect expression of human behavior is a string quartet.”
—Jeffrey Tate (b. 1943)
“All the moral laws are readily translated into natural philosophy, for often we have only to restore the primitive meaning of the words by which they are expressed, or to attend to their literal instead of their metaphorical sense. They are already supernatural philosophy.”
—Henry David Thoreau (18171862)