summaryrefslogtreecommitdiff
path: root/core/string
AgeCommit message (Collapse)Author
2022-03-17Unify TextServer built-in module and GDExtension code.bruvzg
2022-03-15Improve `--debug-stringnames` to be more usefulHugo Locurcio
- Print all StringNames, not just the top 100. - Print statistics at the end of the list of StringNames, with unreferenced and rarely referenced StringNames. - List the CLI argument in `--help` and shell completion.
2022-02-24Optimize String concatenation and copy functionsBartłomiej T. Listwon
2022-02-18[Editor] Fix "en" editor translation detection.bruvzg
2022-02-12Use EditorFileDialog instead of FileDialog in the project managerHendrik Brucker
2022-02-10Fix typos with codespellRémi Verschelde
Using codespell 2.2-dev from current git. Added `misc/scripts/codespell.sh` to make it easier to run it once in a while and update the skip and ignore lists.
2022-02-08Merge pull request #57788 from reduz/describe-sname-usageRémi Verschelde
2022-02-08Clarify SNAME usagereduz
* Explain where it should be used, with examples. * Clarify that it should _not_ be used everywhere, only where needed. * Supersedes #57720 This PR is the result of the discussion that happened in a contractor meeting, and it attempts to clarify the intended use for this macro for other contributors. As a personal note, It is my view that other approaches to using SNAME (like having a global or per class table of string names) are mere overengineering without any real benefit (performance remains the same, and usage of stringnames becomes more cumbersome. Additionally, there was not any significant amount of errors in name mismatching as a result of using strings since Godot was open sourced).
2022-02-08[GDExtension] Add binds for missing methods, operators, and constants ↵bruvzg
required for GDExtension TextServer implementation.
2022-02-05Merge pull request #57017 from godotengine/string-name-static-false-unclaimedRémi Verschelde
2022-02-04Cleanup and move char functions to the `char_utils.h` header.bruvzg
2022-02-04String: Add contains().Anilforextra
2022-01-28Merge pull request #57116 from bruvzg/win_net_shareRémi Verschelde
2022-01-27Merge pull request #57281 from Rubonnek/rename-subsequenceRémi Verschelde
2022-01-26Rename String::is_subsequence_ofi to String::is_subsequence_ofnWilson E. Alvarez
2022-01-24Fix translation with multiple sources for the same language.bruvzg
Remove unnecessary locale length checks. Add "C" -> "en" locale remap.
2022-01-24[Windows] Add support for handling network share paths.bruvzg
2022-01-20Fix false reporting unclaimed StringName at exit due to static refsIgnacio Roldán Etcheverry
2022-01-20Rename or refactor macros to avoid leading underscoresOmar Polo
These are not used consistently and some can conflict with system-specific defines. While here, also delete some unused macros.
2022-01-19Fix locale always selecting translation instead of "en", when no match found.bruvzg
2022-01-18Improve locale detection.bruvzg
Use separate language, script and country lists. Add locale selection dialog and property hint.
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!
2022-01-02Fix various typosluz paz
Found via ` codespell -q 3 -S ./thirdparty,*.po,./DONORS.md -L ackward,ang,ans,ba,beng,cas,childs,childrens,dof,doubleclick,expct,fave,findn,gird,hist,inout,leapyear,lod,nd,numer,ois,ony,paket,seeked,sinc,switchs,te,uint,varn` Update editor/import/resource_importer_layered_texture.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update doc/classes/TileSetScenesCollectionSource.xml Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/gui/graph_edit.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/resources/animation.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/resources/animation.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/resources/animation.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/gui/rich_text_label.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Revert previously committed change
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-10Added check to get_all_locales to avoid adding duplicate locales to arrayraphaelazev
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-30Don't return reference on copy assignment operatorsRémi Verschelde
We prefer to prevent using chained assignment (`T a = b = c = T();`) as this can lead to confusing code and subtle bugs. According to https://en.wikipedia.org/wiki/Assignment_operator_(C%2B%2B), C++ allows any arbitrary return type, so this is standard compliant. This could be re-assessed if/when we have an actual need for a behavior more akin to that of the C++ STL, for now this PR simply changes a handful of cases which were inconsistent with the rest of the codebase (`void` return type was already the most common case prior to this commit).
2021-11-23Rename `remove()` to `remove_at()` when removing by indexLightning_A
2021-11-15Allow dehardcoding documentation branch and URL in docs linksRémi Verschelde
This makes it possible to change the branch of the documentation that URLs are pointing to without having to modify all class reference files. In the XML class reference, the `$DOCS_URL` placeholder should be used, and will be replaced automatically in the editor and when generating the RST class reference. The documentation branch string is set in `version.py`. Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2021-11-11String: Remove `erase` method, bindings can't mutate StringRémi Verschelde
2021-11-11Add missing characters for property name quotingHaoyu Qiu
2021-11-03Rename `PROPERTY_USAGE_NOEDITOR` to `PROPERTY_USAGE_NO_EDITOR`Hugo Locurcio
This is consistent with other constants that include `NO`, such as `PROPERTY_HINT_COLOR_NO_ALPHA`.
2021-10-28Merge pull request #54350 from akien-mga/clang-format-dont-align-operandsRémi Verschelde
2021-10-28Merge pull request #53526 from KoBeWi/super_printRémi Verschelde
2021-10-28clang-format: Various fixes to comments alignment from `clang-format` 13Rémi Verschelde
All reviewed manually and occasionally rewritten to avoid bad auto formatting.
2021-10-28clang-format: Disable alignment of operands, too unreliableRémi Verschelde
Sets `AlignOperands` to `DontAlign`. `clang-format` developers seem to mostly care about space-based indentation and every other version of clang-format breaks the bad mismatch of tabs and spaces that it seems to use for operand alignment. So it's better without, so that it respects our two-tabs `ContinuationIndentWidth`.
2021-10-22Merge pull request #54081 from Rubonnek/add_bin_messages_masterRémi Verschelde
2021-10-21Accept capital B in String::bin_to_int prefixWilson E. Alvarez
2021-10-21Add error messages to String::hex_to_int, and accept capital X in prefixWilson E. Alvarez
2021-10-14Fix specific warnings issues by ClangK. S. Ernest (iFire) Lee
Found by `scons dev=yes` on llvm-mingw.
2021-10-07Change print_line() to use any number of Variantskobewi
2021-10-05Merge pull request #53225 from aaronfranke/c-localeRémi Verschelde
2021-10-04GDScript completion: Handle quote style ad-hoc to remove editor dependencyRémi Verschelde
`core` and `scene` shouldn't depend on `editor`, so they can't query this style setting in `get_argument_options`. But we can handle it after the fact in GDScript's completion code. Also cleans up a couple extra unused invalid includes in `core`.
2021-10-04Merge pull request #53270 from akien-mga/charproxy-add-copy-constructorRémi Verschelde
2021-09-30Use range iterators for `Map`Lightning_A
2021-09-30CharProxy: Add copy constructorRémi Verschelde
Adding the copy constructor is needed to solve a `-Wdeprecated-copy` warning from GCC and Clang, which is raised when upgrading doctest from 2.4.4 to 2.4.6.
2021-09-29Add locale rename for the "C" localeAaron Franke
2021-09-29Implement override of get_message and get_plural_messageO01eg
2021-09-15Fix String::num_real and String test cases when compiling with doublesAaron Franke