aboutsummaryrefslogtreecommitdiff
path: root/src/util/string.h
AgeCommit message (Collapse)Author
2016-06-11Random misc. warning fixes and cleanupskwolekr
- Fix unused c_sand member warning in Valleys Mapgen - Fix some code style - Make some std::string params const ref
2016-05-31Add colored text (not only colored chat).Ekdohibs
Add documentation, move files to a proper place and avoid memory leaks. Make it work with most kind of texts, and allow backgrounds too.
2016-04-24Escape more strings: formspecs, item descriptions, infotexts...Ekdohibs
Also, change the escape character to the more standard \x1b Thus, it can be used in the future for translation or colored text, for example.
2016-03-15Remove chat escape sequences from chat messages, for future colored chat.Ekdohibs
2016-03-07Add minetest.register_lbm() to run code on block load onlyest31
2015-11-06Add server side ncurses terminalest31
This adds a chat console the server owner can use for administration or to talk with players. It runs in its own thread, which makes the user interface immune to the server's lag, behaving just like a client, except timeout. As it uses the same console code as the f10 console, things like nick completion or a scroll buffer basically come for free. The terminal itself is written in a general way so that adding a client version later on is just about implementing an interface. Fatal errors are printed after the console exists and the ncurses terminal buffer gets cleaned up with endwin(), so that the error still remains visible. The server owner can chose their username their entered text will have in chat and where players can send PMs to. Once the username is secured with a password to prevent anybody to take over the server, the owner can execute admin tasks over the console. This change includes a contribution by @kahrl who has improved ncurses library detection.
2015-07-08Use UTF-8 instead of narrowest31
Use wide_to_utf8 and utf8_to_wide instead of wide_to_narrow and narrow_to_wide at almost all places. Only exceptions: test functions for narrow conversion, and chat, which is done in a separate commit.
2015-06-20More correct wrap_rows implementationfigec
2015-06-18Fix wrap_rows at inner byte of multibyte sequencefigec
Also fix UTF-8 inner byte bounds and make unittest for case this fixes.
2015-06-17Make wrap_rows not wrap inside utf-8 multibyte sequencesest31
Also count multibyte sequences as "one" character. Adds unittest for the bug reporter's case. Fixes #2796.
2015-06-13Add utf-8 conversion utilities and re-add intlGUIEditBoxest31
2015-05-18Split ObjDef/ObjDefManager out to objdef.cppkwolekr
2015-05-11Make early protocol auth mechanism generic, and add SRPest31
Adds everything needed for SRP (and everything works too), but still deactivated, as protocol v25 init packets aren't final yet. Can be activated by changing the LATEST_PROTOCOL_VERSION header to 25 inside networkprotocol.h.
2015-04-26Fix fast leaves with texture_clean_transparent enabled.Aaron Suen
2015-04-17Refactor around translatePasswordest31
Change types for passed password from wstring to string, which removes converting back and forth in most cases. Move the narrow_to_wide conversion, where its neccessary, closer to irrlicht. Remove trailing spaces in guiPasswordChange.cpp. Make parameters for translatePassword passed as const reference.
2015-03-07Fix Android text bug (no text displaying)Craig Robbins
2015-02-05Reduce gettext wide/narrow and string/char* conversionsShadowNinja
2015-01-16Make minor style change(unescape_string())Craig Robbins
2015-01-15Fix unescape_string removing all backslashesShadowNinja
2015-01-03Deduplicate code and use stdlib in string functionsShadowNinja
2014-11-25Fixes for Android build errors. Enable sensor landscape rotation.KodexKy
Fix typo in Android Makefile ndk path. Fix touchscreen parts of game.cpp to work after Zeno's refactor. Fix isdigit and isspace overload conflict with Android Irrlicht in string.h Enable sensor landscape rotation in Android Manifiest. Add mapgen v5 to Android build. Fix Makefile not checking leveldb. Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2014-11-02Cleanup and (mostly) document util/string.h and (very) minor refactoringCraig Robbins
Updated: Incorporated feedback from 'kahrl' Updated: Moved MinetestApp::boolToCStr() from game.cpp into string.h renaming it bool_to_cstr()
2014-10-29Fix bug introduced by me (Zeno)Craig Robbins
2014-10-29Added names colours and refactored parseColorString()Craig Robbins
2014-10-05Add [colorize modifierBlockMen
2014-09-28Standardize tooltip row detectionBlockMen
2014-09-21Use const references for Settings methodsShadowNinja
Also check for (this == &other) before locking mutexes.
2014-06-29Fix msvc2012 buildsapier
2014-06-29Add formspec api versioningsapier
2014-03-12Replace usage of long long with u64/s64ShadowNinja
2014-02-09Add capability to read table flag fields from Lua APIkwolekr
2014-02-08Make flag strings clear specified flag with 'no' prefixkwolekr
Remove flagmask field from set_mapgen_params table Add small bits of needed documentation
2014-02-05Revert "Fix settings to honor numeric conversion errors"kwolekr
This reverts commit 3f376a092e1c16429fb52f24736e9da98aff4cd5.
2014-02-04Fix settings to honor numeric conversion errorssapier
Rename try* non exceptioning functions to *NoEx
2013-12-13Implement urlencode and urldecodeKahrl
2013-11-04Accept hexadecimal and string values for seedskwolekr
2013-09-11Change mainmenu texture handling + small misc changesKahrl
Texture names must now be escaped in formspec elements image[], background[], image_button[], image_button_exit[]. Instead of special-case handling of texture loading (and unloading which was missing) in guiFormSpecMenu.cpp, use the newly created ISimpleTextureSource interface which is a minimal subset of ITextureSource. There is an implementation of this interface used by GUIEngine (MenuTextureSource). Fix an off-by-one bug in unescape_string; it caused requests for a texture called "\0".
2013-09-09Add dummy and LevelDB database backendsIlya Zhuravlev
2013-08-14Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenuKahrl
2013-07-08Settings: everything != 0 equals true; remove .asm shadersPilzAdam
2013-03-05Allow any character in formspec strings with escape charkwolekr
2013-02-24Update Copyright YearsSfan5
2013-02-24Change Minetest-c55 to MinetestPilzAdam
2013-02-06Add flag string settings, flat map optionkwolekr
2013-01-23Fix compile under MingWkwolekr
2012-12-16Added ability to fetch media from remote server (using cURL library)Ilya Zhuravlev
2012-09-05Enforce stricter world names using a blacklistMatthew I
Blacklisted characters are: / \
2012-06-17Initially split utility.h to multiple files in util/Perttu Ahola