summaryrefslogtreecommitdiff
path: root/core/ustring.h
AgeCommit message (Collapse)Author
2020-07-27Make all String float conversion methods be 64-bitAaron Franke
2020-07-03Remove String::find_last (same as rfind)Stijn Hinlopen
2020-06-03Rename String bin_to_int64 to bin_to_intAaron Franke
And also change String static to_int(const char *) to return int64_t
2020-06-03Remove 32-bit String hex_to_int methodAaron Franke
2020-06-03Remove 32-bit String to_int methodAaron Franke
2020-05-14Style: Enforce braces around if blocks and loopsRémi Verschelde
Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde
Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
2020-05-10New lightmapperJuan Linietsky
-Added LocalVector (needed it) -Added stb_rect_pack (It's pretty cool, we could probably use it for other stuff too) -Fixes and changes all around the place -Added library for 128 bits fixed point (required for Delaunay3D)
2020-04-02Replace NULL with nullptrlupoDharkael
2020-03-20i18n: Add support for translating the class referenceRémi Verschelde
- Parse `.po` files from `doc/translations/*.po` like already done with `editor/translations/*.po`. - Add logic to register a doc translation mapping in `TranslationServer` and `EditorSettings`. - Add `DTR()` to lookup the doc translation mapping (similar to `TTR()`). Strings are automatically dedented and stripped of whitespace to ensure that they would match the translation catalog. - Use `DTR()` to translate relevant strings in `EditorHelp`, `EditorInspector`, `CreateDialog`, `ConnectionsDialog`. - Small simplification to `TranslationLoaderPO`, the path argument was not really meaningful.
2020-02-11A lot of progress with canvas rendering, still far from working.Juan Linietsky
2020-01-01Update copyright statements to 2020Rémi Verschelde
Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
2019-12-20Encodes property names properly in project.godotHaoyu Qiu
2019-11-01Fix some crashes, overflows and using variables without valuesRafał Mikrut
2019-10-04Bind the `String::humanize_size` methodAndrii Doroshenko (Xrayez)
The method signature is also changed to use `uint64_t` instead of `size_t` for it to be Variant-compatible.
2019-09-03Create a GDScript String function repeatBhupendra Aole
Fixes #30610
2019-08-12Remove redundant author doc commentsIAmActuallyCthulhu
2019-07-23Added count method to StringChaosus
2019-07-03Add sha1 functions to string (using new CryptoCore)Fabio Alessandrelli
2019-06-26Some code changed with Clang-Tidyqarmin
2019-06-19Merge pull request #28648 from KoBeWi/substr-1Rémi Verschelde
Make second parameter of substr optional
2019-06-16i18n: Fix extract.py support for new TTRCRémi Verschelde
Also make compatible with Python 3.
2019-05-03Make second parameter of substr optionalTomasz Chabora
2019-04-25Support for binary literals in GDScript. Added an error that shows if a ↵jude-lafitteIII
point is written in a hex literal. Added highlighting for binary literals in GDScript
2019-04-22fixed an access after free in OS_X11::set_context.Ibrahn Sahir
Added constructor and assignment operator for CharString from const char* to simplify memory management when working with utf8/ascii strings for APIs taking char*. Reworked OS_X11::set_context to use CharString and avoid some manual memory management.
2019-04-08Add ability to edit editor feature profilesJuan Linietsky
Allows enabling/disabling parts of the editor and storing/loading profiles for that.
2019-03-02Fix new GCC 9 warnings: -Wdeprecated-copy.marxin
2019-02-21Fix warnings seen with -Wignored-qualifiers.marxin
2019-01-07Repair String lstrip and rstrip.Ibrahn Sahir
Background: lstrip and rstrip were broken by changes to String in: 0e29f7974b59e4440cf02e1388fb9d8ab2b5c5fd which removed it's access to Vector::find(CharType). Moved Vector's find up into CowData so it can be shared by Vector and String. Added String::find_char using CowData::find. Implemented rstrip and lstrip using find_char. Added a few tests for String rstrip and lstrip.
2019-01-04String[size()] should return a default constructed CharTypeHein-Pieter van Braam
As per the C++ standard 21.3.4.1 for std::string: Returns: If pos < size(), returns data()[pos]. Otherwise, if pos == size(), the const version returns charT(). Otherwise, the behavior is undefined. Since the behavior is undefined Godot now does the same thing for const and non-const versions of operator[]. This fixes #21242 and fixes #22221.
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!
2018-12-16Reduce String CoWHein-Pieter van Braam
By introducing an intermediate proxy class for the array subscript operator for String and CharString we can control better when CowData will actually CoW. This should improve performance of String usage for most cases.
2018-12-03const char* operator on CharString now const.Ibrahn Sahir
2018-09-12Make core/ includes absolute, remove subfolders from include pathRémi Verschelde
This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
2018-08-06fix out of buffer read when copying non-null terminated stringsMarcin Zawiejski
2018-07-26Reduce unnecessary COW on Vector by make writing explicitHein-Pieter van Braam
This commit makes operator[] on Vector const and adds a write proxy to it. From now on writes to Vectors need to happen through the .write proxy. So for instance: Vector<int> vec; vec.push_back(10); std::cout << vec[0] << std::endl; vec.write[0] = 20; Failing to use the .write proxy will cause a compilation error. In addition COWable datatypes can now embed a CowData pointer to their data. This means that String, CharString, and VMap no longer use or derive from Vector. _ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug builds. This is a lot faster for Vector in the editor and while running tests. The reason why this difference used to exist is because force-inlined methods used to give a bad debugging experience. After extensive testing with modern compilers this is no longer the case.
2018-07-24removed redundant strlen calculation from String::substrIbrahn Sahir
2018-05-23Merge pull request #14715 from Krakean/string_add_rsplit2Max Hilbrunner
Added rsplit() method to String class
2018-04-22Merge pull request #18176 from nikibobi/string-trimGeorge Marques
Add string trim_prefix, trim_suffix, lstrip and rstrip methods
2018-04-17add string trim_prefix trim_suffix lstrip and rstrip methodsbosak
2018-04-12Revert "Unify http- and percent- encode/decode"Pedro J. Estébanez
This reverts commit b76ee30917c63211ac9e94a21bebbddf518d169f.
2018-03-27Unify http- and percent- encode/decodePedro J. Estébanez
There was a percent-prefixed version, which was exposed, and a http-prefixed version which was not (only to GDNative). This commit keeps the percent-prefixed versions, but with the http-prefixed implementations.
2018-02-25Mono: Better versioning and gracefully unloading of Godot API assembliesIgnacio Etcheverry
2018-01-05Add missing copyright headers and fix formattingRémi Verschelde
Using `misc/scripts/fix_headers.py` on all Godot files. Some missing header guards were added, and the header inclusion order was fixed in the Bullet module.
2018-01-01Update copyright statements to 2018Rémi Verschelde
Happy new year to the wonderful Godot community!
2018-01-01Merge pull request #14973 from poke1024/docs-word-selectionNoshyaar
Double-click word selection for RichTextLabel (i.e. docs)
2017-12-28Double-click word selection for RichTextLabel (i.e. docs)Bernhard Liebl
2017-12-27Merge pull request #14744 from poke1024/stringname-compareJuan Linietsky
Avoid string allocations in AlphCompare
2017-12-17Avoid string allocations in AlphCompareBernhard Liebl
2017-12-16Merge pull request #14576 from poke1024/stringsRémi Verschelde
Some performance tweaking of string handling