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:
“As I came home through the woods with my string of fish, trailing my pole, it being now quite dark, I caught a glimpse of a woodchuck stealing across my path, and felt a strange thrill of savage delight, and was strongly tempted to seize and devour him raw; not that I was hungry then, except for that wildness which he represented.”
—Henry David Thoreau (18171862)
“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)