String Literal

From BR Wiki
Jump to navigation Jump to search

See also: String.

A string literal is not a variable. A string literal is a series of alpha-numeric characters encapsulated within quotes (single or double). String literals are have many purposes in programming.

For example:

"This is a string literal"


'This is a string literal'

Quotes may be used inside of string literals. For example:

'This is a "string literal"'


"This is a ""string literal"""

The double quotes used in the example above evaluate to a single " in the value returned.