summaryrefslogtreecommitdiff
path: root/tests/core/string
AgeCommit message (Collapse)Author
2023-02-02Fix String.split() with empty string and delimeterVolTer
2023-01-05One Copyright Update to rule them allRémi Verschelde
As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
2022-11-24Improve logic for detecting and tracking extensionsBastiaan Olij
2022-11-20Double precision of `String.split_floats`Micky
2022-11-04Add support for empty delimiter in String.splitkobewi
2022-10-15Fix big negative numbers printing incorrect decimals in num_realAaron Franke
2022-10-13Make String.simplify_path keep the protocol identifier for urlsGilles Roudière
2022-10-03Merge pull request #64833 from MarcusElg/naninfprintingRémi Verschelde
Improve string formatting (%f and %v) for inf and nan
2022-08-30Add `String.to_{camel,pascal,snake}_case` methodsDanil Alexeev
2022-08-29Rename String `plus_file` to `path_join`Aaron Franke
2022-08-25Improve string formatting for %f and %v for inf and nanMarcus Elg
2022-08-24Formatting changes to string test commentsMarcus Elg
2022-08-23Add %v for formatting vectorsMarcus Elg
2022-08-04Tests: Silence some intentional errorsRémi Verschelde
Also fix printing messages in ClassDB test.
2022-08-01File: Re-add support to skip CR (`\r`) in `File::get_as_text`Rémi Verschelde
This was removed in #63481, and we confirmed that it's better like this, but we add back the possibility to strip CR as an option, to optionally restore the previous behavior. For performance this is done directly in `String::parse_utf8`. Also fixes Android `FileAccess::get_line()` as this one _should_ strip CR. Supersedes #63717.
2022-07-07Allows parsing of invalid UTF-16 surrogates (can be encountered in Windows ↵bruvzg
filenames) and some non-standard UTF-8 variants, makes Unicode parse errors more verbose.
2022-05-17Create onready variables when dropping nodes and holding CtrlHaoyu Qiu
2022-05-16Replace most uses of Map by HashMapreduz
* Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
2022-05-01Fix left aligned integer sign in string formattingHaoyu Qiu
2022-02-16Style: Cleanup single-line blocks, semicolons, dead codeRémi Verschelde
Remove currently unused implementation of TextureBasisU, could be re-added later on if needed and ported.
2022-02-04String: Add contains().Anilforextra
2022-01-29simplify formatting scripts, add a clang-tidy script, and run clang-tidyNathan Franke
2022-01-26Rename String::is_subsequence_ofi to String::is_subsequence_ofnWilson E. Alvarez
2022-01-15Replace String::num_real code with a wrapper around String::numAaron Franke
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-12-16Make `--doctool` locale awareHaoyu Qiu
* Adds `indent(str)` to `String`: * Indent the (multiline) string with the given indentation. * This method is added in order to keep the translated XML correctly indented. * Moves the loading of tool/doc translation into `editor/editor_translation.{h,cpp}`. * This will be used from both `EditorSettings` and the doc tool from `main`. * Makes use of doc translation when generating XML class references, and setup the translation locale based on `-l LOCALE` CLI parameter. The XML class reference won't be translated if `-l LOCALE` parameter is not given, or when it's `-l en`.
2021-12-09Replace String comparisons with "", String() to is_empty()Nathan Franke
Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
2021-11-11String: Remove `erase` method, bindings can't mutate StringRémi Verschelde
2021-11-07Move and organize tests into subfoldersAaron Franke