diff --git a/docs/expressions/string.html b/docs/expressions/string.html index 9a39c7e..349b90e 100644 --- a/docs/expressions/string.html +++ b/docs/expressions/string.html @@ -1,30 +1,21 @@ -

String literal

+

String literal


string is zero or more characters written inside single or double quotes.

You can use quotes inside a string, as long as they don't match the quotes surrounding the string:

-
var
-{
-    var1 = "It's alright"
-    var2 = "He is called 'Johnny'"
-    var3 = 'He is called "Johnny"'
-}
+
$var1 = "It's alright"
+$var2 = "He is called 'Johnny'"
+$var3 = 'He is called "Johnny"'

Single quotes

single quotes allow you to use the syntax of expressions within them.
The @ sign must be placed before the expressions.

-
dynamic
-{
-    item(title = 'windows dir path: @sys.dir')
-}
+
item(title = 'windows dir path: @sys.dir')

Double quotes

double quotes allow you to use the Escape Character inside them only.
The backslash (\) escape character turns special characters into characters.
The sequence \" inserts a double quote in a string:

-
var
-{
-    var1 = "hello\"world"
-    // result: hello"world
-}
+
$var1 = "hello\"world"
+// result: hello"world

The complete set of escape sequences is as follows:

@@ -44,4 +35,3 @@
\UxxxxxxxxUnicode escape sequence (UTF-32) \U00HHHHHH (range: 000000 - 10FFFF)
-