String Literal

From Br Wiki
Jump to: navigation, 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"

or

'This is a string literal'

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

'This is a "string literal"'

or

"This is a ""string literal"""

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