Using String Literals in the Expression Builder
A string literal represents a string value within the source code of a computer program.
TIP: See here for more information.
String literals can be used in the Expression Builder dialog and can be enclosed in matching single quotes (') or double quotes (").
String literals in expressions can also use 32-bit Unicode escape sequences (for example '\U00000041' ('A'), as well as 16-bit ones like '\u0041').
\U and \u escape sequences cannot be used within C# or C++ 11 string literals.
Valid SIS escape sequences are:
\b backspace
\f form feed
\n line feed
\r carriage return
\t horizontal tab
\uXXXX UTF-16 unicode character where XXXX are 4 hexadecimal digits
\v vertical tab
\" double quote
\' single quote
\\ backslash
You can use either single quotes or double quotes for text, "'" and '\'' are equivalent, as are '"' and "\"".
Note: Entering an invalid escape sequence will cause the entire expression to be invalid.
String literals in expressions can be specified using C# or C++ 11 styles, for simpler embedding of backslashes and/or quote characters:
C# verbatim string literals
- Overlay(@"C:\Folder\Cadcorp's Offices.idb", {Postcode$=@"SG1 2JY"}) (any double-quote characters within the literal string must be doubled)
- Overlay(@'C:\Folder\Cadcorp''s Offices.idb',{Postcode$=@'SG1 2JY'}) (any single-quote characters within the literal string must be doubled)
C++ 11 raw string literals
- Overlay(R"(C:\Folder\Cadcorp's Offices.idb)") (the literal string must not contain the )" sequence)
- Overlay(R'(C:\Folder\Cadcorp's Offices.idb)') (the literal string must not contain the )' sequence)
- Overlay(R"#(...)#") (the literal string must not contain the )#" sequence)
- Overlay(R'#(...)#') (the literal string must not contain the )#' sequence)
- Overlay(R"##(...)##") (the literal string must not contain the )##" sequence)
- Overlay(R'##(...)##') (the literal string must not contain the )##' sequence)
- etc, with up to 5 # characters but no support for generic delimiters.