aboutsummaryrefslogtreecommitdiff
path: root/src/util/string.h
AgeCommit message (Collapse)Author
2020-07-28Sanitize world directory names on create. Keep original name separate (#9432)Hugues Ross
Blacklisted characters are replaced by '_' in the path. The display name is stored in world.mt, and duplicate file names are resolved by adding an incrementing suffix (_1, _2, _3, etc).
2020-04-25Add server side translations capability (#9733)EvidenceB Kidscode
* Add server side translations capability
2020-03-07GUIHyperText: Fix bug with UTF8 chars in action name + simplify UTF8 stringw ↵Jean-Patrick Guerrero
conversion (#9437) Co-authored-by: Pierre-Yves Rollo <dev@pyrollo.com>
2019-11-03Formspec: add hypertext elementPierre-Yves Rollo
2018-08-05Replace auth.txt with SQLite auth database (#7279)Ben Deutsch
* Replace auth.txt with SQLite auth database
2018-04-23Formspecs: Allow setting alpha value for the box[] elementThomas--S
2017-08-24Add clientside translations.Ekdohibs
2017-08-20Modernize source code: last part (#6285)Loïc Blot
* Modernize source code: last par * Use empty when needed * Use emplace_back instead of push_back when needed * For range-based loops * Initializers fixes * constructors, destructors default * c++ C stl includes
2017-08-17C++ modernize: Pragma once (#6264)Loïc Blot
* Migrate cpp headers to pragma once
2017-06-04C++11 patchset 2: remove util/cpp11.h and util/cpp11_container.h (#5821)Loïc Blot
2017-05-11Rework escape/pause menu (#5719)red-001
* Rework escape/pause menu - Remove build information - Use current controls instead of default controls - Add information about the current server in place of the build information - Add text saying the game is paused to if in singleplayer mode. rework pause/escape menu * improve consistency + display server_name
2017-04-20Fix various copy instead of const ref reported by cppcheck (part 3) (#5616)Loïc Blot
* Also remove 2 non declared but defined functions * Make some functions around const ref changes const
2017-04-17Fix MSVC build broken by 34d32ceSmallJoker
`round` -> `myround` Remove superflous `floor` calls
2017-04-15Implement delayed server shutdown with cancelation (#4664)Loïc Blot
2017-01-07Revert "Extend minetest.is_yes()"sfan5
This reverts commit c435eabf3ffb77eab955d5faeb5450da1befc149.
2017-01-07Extend minetest.is_yes()red-001
2016-10-06Use more unordered_maps to improve performance in c++11 buildsLoic Blot
2016-08-11Use the standard to_string() functions for C++11 (#4279)Rogier-5
If compiling according to a C++ version before C++11, then define std::to_string ourselves. Add a to_wstring version as well As std::to_string() for floating point types uses %.6f as floating point format converter, instead of %G, it needs special care. To preserve ftos() behavior (which is expected to use the %G format converter), it no longer uses to_string().
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