documentation fixes

This commit is contained in:
albertodemichelis
2016-03-27 19:58:27 +08:00
parent 04a4ff5c8d
commit c52b25d864
5 changed files with 12 additions and 2 deletions

View File

@ -14,6 +14,10 @@ Squirrel API
Global Symbols
++++++++++++++
.. js:function:: endswith(str, cmp)
returns `true` if the end of the string `str` matches a the string `cmp` otherwise returns `false`
.. js:function:: ecape(str)
Returns a string with backslashes before characters that need to be escaped(`\",\a,\b,\t,\n,\v,\f,\r,\\,\",\',\0,\xnn`).
@ -50,6 +54,11 @@ Global Symbols
local a = split("1.2-3;4/5",".-/;");
// the result will be [1,2,3,4,5]
.. js:function:: startswith(str, cmp)
returns `true` if the beginning of the string `str` matches a the string `cmp` otherwise returns `false`
.. js:function:: strip(str)
Strips white-space-only characters that might appear at the beginning or end of the given string and returns the new stripped string.