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:
“A culture may be conceived as a network of beliefs and purposes in which any string in the net pulls and is pulled by the others, thus perpetually changing the configuration of the whole. If the cultural element called morals takes on a new shape, we must ask what other strings have pulled it out of line. It cannot be one solitary string, nor even the strings nearby, for the network is three-dimensional at least.”
—Jacques Barzun (b. 1907)
“Woe to the makers of literal translations, who by rendering every word weaken the meaning! It is indeed by so doing that we can say the letter kills and the spirit gives life.”
—Voltaire [François Marie Arouet] (16941778)