summaryrefslogtreecommitdiff
path: root/core/string
AgeCommit message (Collapse)Author
2021-07-13Merge pull request #49291 from NoFr1ends/fix-49262Rémi Verschelde
String::format leave passed values untouched
2021-06-19Rename `instance()`->`instantiate()` when it's a verbLightning_A
2021-06-16Rename `is_valid_integer()` to `is_valid_int()`Lightning_A
Method from `String`
2021-06-16Merge pull request #49505 from underdoeg/patch-2Rémi Verschelde
fix url parsing with port numbers
2021-06-13Merge pull request #34668 from aaronfranke/to-stringRémi Verschelde
[Core] Reformat structure string operators
2021-06-11Reformat structure string operatorsAaron Franke
The order of numbers is not changed except for Transform2D. All logic is done inside of their structures (and not in Variant). For the number of decimals printed, they now use String::num_real which works best with real_t, except for Color which is fixed at 4 decimals (this is a reliable number of float digits when converting from 16-bpc so it seems like a good choice)
2021-06-11Merge pull request #49511 from akien-mga/core-diraccess-fileaccess-ioRémi Verschelde
Core: Move DirAccess and FileAccess to `core/io`
2021-06-11Merge pull request #49279 from Calinou/rename-string-is-abs-path-methodRémi Verschelde
Rename `String.is_abs_path()` to `String.is_absolute_path()`
2021-06-11Core: Move DirAccess and FileAccess to `core/io`Rémi Verschelde
File handling APIs are typically considered part of I/O, and we did have most `FileAccess` implementations in `core/io` already.
2021-06-11fix url parsing with port numbersPhilip Whitfield
String.get_slice_count is always at least 1 or 2 for bases with a port number. Before this change the following URL would return ERR_INVALID_PARAMETER ```ws://127.0.0.1:8000/test```
2021-06-03String::format leave passed values untouchedJonas Bernemann
If the passed value or key contains double quotation marks it will no longer get removed.
2021-06-03Rename `String.is_abs_path()` to `String.is_absolute_path()`Hugo Locurcio
This is more consistent with `NodePath.is_absolute()`.
2021-05-29Increase String::num default decimal precisionHeikki Simojoki
Fixes #34541 Renamed MAX_DIGITS to MAX_DECIMALS, since it only changes the amount of digits after the decimal point. Increased MAX_DECIMALS to 32, and made String::num use MAX_DECIMALS consistently. If -1 is passed as decimal precision to String::num, it now gets changed to the correct precision based on the number's magnitude, instead of using printf default(which is 6) String::num_real also calculates the correct precision now. Also made the types used in floating-point math more consistent in a few places.
2021-05-21Fix usage of String.left()kobewi
2021-05-20Change behavior of String.rightTomasz Chabora
2021-05-03Check PHashTranslation generate p_from is validMaxStgs
2021-05-03Merge pull request #48205 from Faless/net/4.x_url_parsingFabio Alessandrelli
[Net] Implement String::parse_url for parsing URLs.
2021-04-30Fix `url_decode` with mixed percent-encoding/Unicode strings. Treat Unix ↵bruvzg
drive names as UTF-8 encoded.
2021-04-27Core: Drop custom `copymem`/`zeromem` definesRémi Verschelde
We've been using standard C library functions `memcpy`/`memset` for these since 2016 with 67f65f66391327b2967a20a89c3627e1dd6e84eb. There was still the possibility for third-party platform ports to override the definitions with a custom header, but this doesn't seem useful anymore.
2021-04-26Remove uses of `auto` for better readability and online code reviewsHugo Locurcio
The current code style guidelines forbid the use of `auto`. Some uses of `auto` are still present, such as in UWP code (which can't be currently tested) and macros (where removing `auto` isn't easy).
2021-04-26[Net] Implement String::parse_url for parsing URLs.Fabio Alessandrelli
Splits the URL into (scheme, host, port, path). Supports both literal IPv4 and IPv6. Strip credentials when present (e.g. http://user:pass@example.com/). Use that function in both HTTPRequest and WebSocketClient.
2021-04-23NodePath: Remove unimplemented `get_parent()` methodRémi Verschelde
Fixes #48100.
2021-04-10Merge pull request #47512 from DanielKriz/bugfix/uri_encodeFabio Alessandrelli
fix wrong encoding format in uri_encode
2021-04-10fix wrong encoding in uri_encodeDaniel Kříž
2021-04-01Merge pull request #46991 from madmiraal/rename-invert-reverseRémi Verschelde
Rename Array.invert() to Array.reverse()
2021-03-23Merge pull request #45234 from madmiraal/rename-phashtranslationRémi Verschelde
Rename PHashTranslation to OptimizedTranslation
2021-03-22Merge pull request #34587 from ↵Rémi Verschelde
YeldhamDev/translation_resource_notification_removal Remove translation change notification when setting the locale of a Translation resource
2021-03-21Rename Array.invert() to Array.reverse()Marcel Admiraal
Does the same internally for List and Vector<>, which includes all PackedArray types.
2021-03-20Rename PHashTranslation to OptimizedTranslationMarcel Admiraal
2021-03-12Fixes small typos and grammar correctionAnshul7sp1
2021-03-09Merge pull request #45545 from abaire/relaxes_gltf_name_sanitizationRémi Verschelde
Relaxes node name sanitization in gltf documents.
2021-02-24Relaxes Node naming constraints in glTF documents to match the Editor.abaire
2021-02-24Merge pull request #45914 from HenryWConklin/45841-xml-entitiesRémi Verschelde
Add support for numeric XML entities to XMLParser
2021-02-24Merge pull request #46195 from AndyBarcia/FixLanguageCodesIncosistenciesRémi Verschelde
Fix some inconsistent ISO-639 language codes
2021-02-18Fixes some inconsistent ISO-639 language codesandybarcia
And also adds tmz (Central Atlas Tamazight) as a language
2021-02-18Reorganize Project Settingsreduz
-Advanced Settings toggle also hides advanced properties when disabled -Simplified Advanced Bar (errors were just plain redundant) -Reorganized rendering quality settings. -Reorganized miscelaneous settings for clean up.
2021-02-14Add support for numeric XML entities to XMLParserHenry Conklin
* Add support for decimal numeric entities to String::xml_unescape * Add more error checks to String::xml_unescape * Refactor XMLParser to use String::xml_unescape instead of an internal implementation
2021-02-09Make String::ends_with don't use String::rfindkleonc
2021-01-28Unify URI encoding/decoding and add to C#Aaron Franke
http_escape and percent_encode have been unified into uri_encode, and http_unescape and percent_decode have been unified into uri_decode.
2021-01-28Make hex_to_int and bin_to_int handle the prefix automaticallyAaron Franke
Also add BinToInt to C#
2021-01-27Merge pull request #45489 from aaronfranke/coreRémi Verschelde
Type consistencies in core
2021-01-26Type consistencies in coreAaron Franke
2021-01-26Renamed String.ord_at to unicode_atYuri Roubinsky
2021-01-19Fix String.ends_with() for empty string argumentsVedat Günel
2021-01-01Update copyright statements to 2021Rémi Verschelde
Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
2020-12-28Rename empty() to is_empty()Marcel Admiraal
2020-12-23Fix the `String::get_base_dir()` logic to properly check for top level ↵Fredia Huya-Kouadio
directories on Windows.
2020-12-09Static analyzer fixes:bruvzg
Removes unused code in OS. Fixes return types. Fixes few typos.
2020-11-26[Complex Text Layouts] Refactor Font class, default themes and controls to ↵bruvzg
use Text Server interface. Implement interface mirroring. Add TextLine and TextParagraph classes. Handle UTF-16 input on macOS and Windows.
2020-11-26[Complex Text Layouts] Implement TextServer interface. Implement Fallback ↵bruvzg
TextServer.