diff options
author | Diego MartÃnez <kaeza@users.noreply.github.com> | 2014-12-29 20:46:24 -0300 |
---|---|---|
committer | ShadowNinja <shadowninja@minetest.net> | 2014-12-30 00:42:50 -0500 |
commit | cfec470b513f06670fd7b791aca62fd2c8384c53 (patch) | |
tree | 5bd39ad60a75aa389c8cd4eba5f7789510c81c00 /doc | |
parent | c6df2bc42ca82eb75136112c3ad5610a42c1ea6a (diff) | |
download | minetest-cfec470b513f06670fd7b791aca62fd2c8384c53.tar.gz minetest-cfec470b513f06670fd7b791aca62fd2c8384c53.tar.bz2 minetest-cfec470b513f06670fd7b791aca62fd2c8384c53.zip |
Fix documentation for string functions
Diffstat (limited to 'doc')
-rw-r--r-- | doc/lua_api.txt | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 7dae2c58a..642ac4130 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -1378,9 +1378,11 @@ math.hypot(x, y) math.sign(x, tolerance) ^ Get the sign of a number Optional: Also returns 0 when the absolute value is within the tolerance (default 0) -string:split(separator) -^ e.g. string:split("a,b", ",") == {"a","b"} -string:trim() +string.split(str, separator=",", include_empty=false, max_splits=-1, sep_is_pattern=false) +^ If max_splits is negative, do not limit splits. +^ sep_is_pattern specifies if separator is a plain string or a pattern (regex). +^ e.g. string.split("a,b", ",") == {"a","b"} +string.trim(str) ^ e.g. string.trim("\n \t\tfoo bar\t ") == "foo bar" minetest.pos_to_string({x=X,y=Y,z=Z}) -> "(X,Y,Z)" ^ Convert position to a printable string |