|
@@ -18,7 +18,7 @@ Global Symbols
|
|
|
|
|
|
|
|
returns `true` if the end of the string `str` matches a the string `cmp` otherwise returns `false`
|
|
returns `true` if the end of the string `str` matches a the string `cmp` otherwise returns `false`
|
|
|
|
|
|
|
|
-.. js:function:: ecape(str)
|
|
|
|
|
|
|
+.. js:function:: escape(str)
|
|
|
|
|
|
|
|
Returns a string with backslashes before characters that need to be escaped(`\",\a,\b,\t,\n,\v,\f,\r,\\,\",\',\0,\xnn`).
|
|
Returns a string with backslashes before characters that need to be escaped(`\",\a,\b,\t,\n,\v,\f,\r,\\,\",\',\0,\xnn`).
|
|
|
|
|
|
|
@@ -28,10 +28,18 @@ Global Symbols
|
|
|
The format string follows the same rules as the `printf` family of
|
|
The format string follows the same rules as the `printf` family of
|
|
|
standard C functions( the "*" is not supported). ::
|
|
standard C functions( the "*" is not supported). ::
|
|
|
|
|
|
|
|
- eg.
|
|
|
|
|
|
|
+ e.g.
|
|
|
sq> print(format("%s %d 0x%02X\n","this is a test :",123,10));
|
|
sq> print(format("%s %d 0x%02X\n","this is a test :",123,10));
|
|
|
this is a test : 123 0x0A
|
|
this is a test : 123 0x0A
|
|
|
|
|
|
|
|
|
|
+.. js:function:: printf(formatstr, ...)
|
|
|
|
|
+
|
|
|
|
|
+ Just like calling `print(format(formatstr` as in the example above, but is more convenient AND more efficient. ::
|
|
|
|
|
+
|
|
|
|
|
+ e.g.
|
|
|
|
|
+ sq> printf("%s %d 0x%02X\n","this is a test :",123,10);
|
|
|
|
|
+ this is a test : 123 0x0A
|
|
|
|
|
+
|
|
|
.. js:function:: lstrip(str)
|
|
.. js:function:: lstrip(str)
|
|
|
|
|
|
|
|
Strips white-space-only characters that might appear at the beginning of the given string
|
|
Strips white-space-only characters that might appear at the beginning of the given string
|