1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

CSM: Document forgotten functions

This commit is contained in:
SmallJoker 2017-05-13 13:14:41 +02:00 committed by paramat
parent fd32005b0f
commit 0120fe16a7
5 changed files with 44 additions and 8 deletions

View file

@ -1931,7 +1931,10 @@ Helper functions
* e.g. `string:split("a,b", ",") == {"a","b"}`
* `string:trim()`
* e.g. `string.trim("\n \t\tfoo bar\t ") == "foo bar"`
* `minetest.pos_to_string({x=X,y=Y,z=Z}, decimal_places))`: returns `"(X,Y,Z)"`
* `minetest.wrap_text(str, limit)`: returns a string
* Adds new lines to the string to keep it within the specified character limit
* limit: Maximal amount of characters in one line
* `minetest.pos_to_string({x=X,y=Y,z=Z}, decimal_places))`: returns string `"(X,Y,Z)"`
* Convert position to a printable string
Optional: 'decimal_places' will round the x, y and z of the pos to the given decimal place.
* `minetest.string_to_pos(string)`: returns a position