summaryrefslogtreecommitdiff
path: root/src/util/string.h
Commit message (Collapse)AuthorAge
* Tweak duration_to_string formattingWuzzy2021-03-16
|
* Drop wide/narrow conversion functionssfan52021-02-02
| | | | | | | | | The only valid usecase for these is interfacing with OS APIs that want a locale/OS-specific multibyte encoding. But they weren't used for that anywhere, instead UTF-8 is pretty much assumed when it comes to that. Since these are only a potential source of bugs and do not fulfil their purpose at all, drop them entirely.
* Refactor utf8_to_wide/wide_to_utf8 functionssfan52021-02-02
|
* Sanitize world directory names on create. Keep original name separate (#9432)Hugues Ross2020-07-28
| | | 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).
* Add server side translations capability (#9733)EvidenceB Kidscode2020-04-25
| | | | * Add server side translations capability
* GUIHyperText: Fix bug with UTF8 chars in action name + simplify UTF8 stringw ↵Jean-Patrick Guerrero2020-03-07
| | | | | conversion (#9437) Co-authored-by: Pierre-Yves Rollo <dev@pyrollo.com>
* Formspec: add hypertext elementPierre-Yves Rollo2019-11-03
|
* Replace auth.txt with SQLite auth database (#7279)Ben Deutsch2018-08-05
| | | | * Replace auth.txt with SQLite auth database
* Formspecs: Allow setting alpha value for the box[] elementThomas--S2018-04-23
|
* Add clientside translations.Ekdohibs2017-08-24
|
* Modernize source code: last part (#6285)Loïc Blot2017-08-20
| | | | | | | | | | | * 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
* C++ modernize: Pragma once (#6264)Loïc Blot2017-08-17
| | | | * Migrate cpp headers to pragma once
* C++11 patchset 2: remove util/cpp11.h and util/cpp11_container.h (#5821)Loïc Blot2017-06-04
|
* Rework escape/pause menu (#5719)red-0012017-05-11
| | | | | | | | | | | | * 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
* Fix various copy instead of const ref reported by cppcheck (part 3) (#5616)Loïc Blot2017-04-20
| | | | * Also remove 2 non declared but defined functions * Make some functions around const ref changes const
* Fix MSVC build broken by 34d32ceSmallJoker2017-04-17
| | | | | `round` -> `myround` Remove superflous `floor` calls
* Implement delayed server shutdown with cancelation (#4664)Loïc Blot2017-04-15
|
* Revert "Extend minetest.is_yes()"sfan52017-01-07
| | | | This reverts commit c435eabf3ffb77eab955d5faeb5450da1befc149.
* Extend minetest.is_yes()red-0012017-01-07
|
* Use more unordered_maps to improve performance in c++11 buildsLoic Blot2016-10-06
|
* Use the standard to_string() functions for C++11 (#4279)Rogier-52016-08-11
| | | | | | | | | | | | 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().
* Random misc. warning fixes and cleanupskwolekr2016-06-11
| | | | | | - Fix unused c_sand member warning in Valleys Mapgen - Fix some code style - Make some std::string params const ref
* Add colored text (not only colored chat).Ekdohibs2016-05-31
| | | | | Add documentation, move files to a proper place and avoid memory leaks. Make it work with most kind of texts, and allow backgrounds too.
* Escape more strings: formspecs, item descriptions, infotexts...Ekdohibs2016-04-24
| | | | | | 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.
* Remove chat escape sequences from chat messages, for future colored chat.Ekdohibs2016-03-15
|
* Add minetest.register_lbm() to run code on block load onlyest312016-03-07
|
* Add server side ncurses terminalest312015-11-06
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Use UTF-8 instead of narrowest312015-07-08
| | | | | 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.
* More correct wrap_rows implementationfigec2015-06-20
|
* Fix wrap_rows at inner byte of multibyte sequencefigec2015-06-18
| | | | Also fix UTF-8 inner byte bounds and make unittest for case this fixes.
* Make wrap_rows not wrap inside utf-8 multibyte sequencesest312015-06-17
| | | | | | Also count multibyte sequences as "one" character. Adds unittest for the bug reporter's case. Fixes #2796.
* Add utf-8 conversion utilities and re-add intlGUIEditBoxest312015-06-13
|
* Split ObjDef/ObjDefManager out to objdef.cppkwolekr2015-05-18
|
* Make early protocol auth mechanism generic, and add SRPest312015-05-11
| | | | | | | 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.
* Fix fast leaves with texture_clean_transparent enabled.Aaron Suen2015-04-26
|
* Refactor around translatePasswordest312015-04-17
| | | | | | | 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.
* Fix Android text bug (no text displaying)Craig Robbins2015-03-07
|
* Reduce gettext wide/narrow and string/char* conversionsShadowNinja2015-02-05
|
* Make minor style change(unescape_string())Craig Robbins2015-01-16
|
* Fix unescape_string removing all backslashesShadowNinja2015-01-15
|
* Deduplicate code and use stdlib in string functionsShadowNinja2015-01-03
|
* Fixes for Android build errors. Enable sensor landscape rotation.KodexKy2014-11-25
| | | | | | | | | | | 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>
* Cleanup and (mostly) document util/string.h and (very) minor refactoringCraig Robbins2014-11-02
| | | | | Updated: Incorporated feedback from 'kahrl' Updated: Moved MinetestApp::boolToCStr() from game.cpp into string.h renaming it bool_to_cstr()
* Fix bug introduced by me (Zeno)Craig Robbins2014-10-29
|
* Added names colours and refactored parseColorString()Craig Robbins2014-10-29
|
* Add [colorize modifierBlockMen2014-10-05
|
* Standardize tooltip row detectionBlockMen2014-09-28
|
* Use const references for Settings methodsShadowNinja2014-09-21
| | | | Also check for (this == &other) before locking mutexes.
* Fix msvc2012 buildsapier2014-06-29
|
* Add formspec api versioningsapier2014-06-29
|