""

From Xojo Documentation

Literal

Used to represent a String literal.

Usage

"string "

Part Type Description
string String literal. A string literal value.

Notes

To write a string literal, just enclose the string in double quote marks. To write an empty string, write double quote marks with no space between them.

An empty string is not nil

Despite an empty string contains nothing, such string is not equivalent to nil. Nil represents a non-existing object, whereas an empty string is an existing object even if it is empty.

Including Double Quotes

If you need to include a double quote mark inside your string literal, you can do it by typing two consecutive double quote marks. For example, a sentence like He told me "yes" can be typed in as a string literal as:

Var s As String = "He told me ""yes"""

Following the same logic, the literal """" actually represents a single double quote character (the first and last double quotes denote a string literal and the 2 consecutive double quotes in-between represents a double quote character).

The ampersand (&) character

Be aware that a single ampersand (&) character will often be interpreted as a keyboard shortcut if you are using your string literal inside the user interface, e.g. if you use your string literal as a button caption, a menu item… This behavior is aimed at implementing keyboard shortcuts (a.k.a. keyboard accelerators) on Microsoft Windows operating system. As a consequence, you may need to use "&&" instead of a single "&" character in some cases.

Sample Code

This example concatenates two strings and stores the result in a variable:

Var name As String
name = "George" + " Washington" // name = "George Washington"

See Also

Integer.ToString, [[Double.ToString], DateTime.SQLDate functions.