String Literal

From BR Wiki
Revision as of 19:45, 15 October 2013 by Laura (talk | contribs) (Created page with "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). S...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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"

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.