7fed5f29ed
Merge pull request #99826 from kiroxas/improveParseUTF8Performance
...
Improve `parse_utf8` performance
2025-03-24 10:00:55 -05:00
10f6c01b9c
Remove ABS in favor of Math::abs
2025-03-19 13:52:40 +01:00
a23f630781
Remove String clipping constructors.
...
Callers should instead call constructors with explicit encoding names, with known length `Span`.
2025-03-15 12:34:44 +01:00
754e3b3f9a
Merge pull request #103825 from JulianHeuser/region_highlight_crash_fix
...
Fix crash related to #region/#endregion caused by trailing spaces
2025-03-11 19:54:46 -05:00
659d1b5d0c
Fix crash caused by trailing spaces
2025-03-11 00:06:08 -04:00
331a43a9d8
Add String::remove_char(s) methods for performance and convenience
2025-03-10 13:19:28 +01:00
324512e11c
Style: Replace header guards with #pragma once
2025-03-07 17:33:47 -06:00
e34f1f504c
Use std::size instead of sizeof(a) / sizeof(a[0]) pattern throughout the codebase.
2025-02-07 14:57:48 +01:00
b50d9742c2
Fix is_valid_float, Variant parser, Expression parser, script highlighter, and TextServer not handing capital E in scientific notation.
2025-02-05 18:39:40 +02:00
3be46a69c4
Fix uppercase B and X parsing in the integer literals.
2025-02-05 16:02:06 +02:00
e4f8a7f8cf
improveParseUTF8Performance
2024-12-16 09:55:11 +01:00
964e2b3a9e
Fix handling of leading .. in simplify_path
...
Prior to this `..\..\texture.png` was incorrectly simplified to `texture.png`
2024-12-06 07:53:55 +01:00
63838c936c
Merge pull request #98278 from a-johnston/fuzzy-search-rebase
...
Add fuzzy string matching to quick open search
2024-11-10 12:12:56 -06:00
363c0b5fec
Merge pull request #47502 from KoBeWi/add_0
...
Always add decimal when converting float to string
2024-10-31 20:14:39 -05:00
3ac043c508
Add fuzzy string matching to quick open search
...
Co-authored-by: sam <samsface@gmail.com >
2024-10-28 11:24:36 -07:00
5c0f2414cd
Always add decimal when printing float
2024-10-23 15:00:21 +02:00
b3b24ded19
Add checks for valid base in String::num_int64, uint64().
...
- Ensure String::num_int64, uint64 returns an empty string for bases less than 2 or greater than 36.
- Added corresponding test cases to verify the behavior.
- Error messages are printed when invalid bases are encountered. These messages are suppressed in the test output.
2024-10-20 00:22:08 -07:00
0b258e69f3
Add unit tests for String::parse_url()
2024-10-01 17:09:22 -03:00
6516ca6b11
Parse fragment from URL
2024-09-27 19:42:30 +08:00
a751c05b15
Fix script editor wrongly replaces and quotes non-ASCII letters
2024-09-23 00:05:16 +08:00
3153e9afda
Added more unit tests for String insert and join.
2024-08-29 20:05:44 +03:00
8bf4ecc026
Add String.is_valid_unicode_identifier()
...
- Adds `is_valid_unicode_identifier()`
- Adds `is_valid_ascii_identifier()`
- Deprecates `is_valid_identifier()`
- Renames `validate_identifier()` to `validate_ascii_identifier()`
2024-08-27 11:34:08 +08:00
49e5fbfbd2
Merge pull request #95184 from jsjtxietian/shader-include-relative
...
Fix `String::simplify_path` handling of relative paths to parent dir (`../`), fixes relative shader includes
2024-08-17 00:46:11 +02:00
f483c3aafa
Fix split_floats behavior when spaces are used as separators
2024-08-16 17:30:44 +08:00
6cf9af2817
Fix error when use relative #include in .gdshader / .gdshaderinc file
2024-08-08 11:59:14 +08:00
b4c6cc7d82
[Core] Add case-insensitive String::containsn
2024-05-08 12:48:01 +02:00
d4154dbc55
Add const char * overloads to String class
...
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com >
2024-05-07 10:53:00 -04:00
bb6305d1c4
[Core] Fix incorrect file sort method
2024-03-24 17:54:57 +01:00
2cbf469912
Fix sorting of files/dirs in dialogs
...
Sorts leading `_` before other characters except `.`.
2024-03-20 13:45:47 +01:00
3026b566b0
Fix String::begins_with when both strings are empty
2024-03-05 20:46:10 +02:00
c0aa88ae4f
Add Unicode support to String.to_*_case() methods
2024-02-22 13:58:46 +03:00
5e40124d4d
Add more C++ unit tests for String to number conversions
2023-12-02 20:54:48 +02:00
5cd7ca0ccc
Do not replace starting digit with underscore when making identifier
2023-10-04 08:05:04 -05:00
2b3bbde6da
[String] Fix string conversion for -0.0 float values.
2023-09-05 11:32:55 +03:00
20e24bd2bb
Merge pull request #78529 from Chaosus/string_reverse
...
Add `String.reverse` method
2023-08-16 16:53:40 +02:00
e9f723006a
Use compile-time Unicode string conversion
...
Thanks to this syntax introduced in C++11, this reduces the amount of work
that needs to be performed at run-time while making the code more terse.
2023-08-07 10:38:16 +02:00
cc5500f7de
Fix erroneous pad_zeros warning
2023-07-08 16:16:01 +03:00
100082b3ac
Merge pull request #74760 from lassade/unicode-err-uses-replacement-char
...
Don't append non unicode scalar values on the string, instead use the unicode replacement char
2023-06-22 18:30:04 +02:00
230385b587
Add String.reverse method
2023-06-21 20:40:48 +03:00
7a13cf9aeb
Merge pull request #75510 from SilicDev/string_erase
...
Reimplement `String.erase()` as immutable method
2023-05-05 10:03:49 -07:00
6fa4f71ca6
Reimplement String.erase
2023-05-04 00:52:35 +02:00
223ce4fcb9
Optimize Node::add_child validation
...
Adding 10k nodes is almost twice as fast.
2023-04-07 13:18:47 +02:00
999f3e2c13
use the unicode replacement char on error
...
update tests
also fix utf8 and ascii parse functions to use the replacement char
created a _replacement_char const inside the string
2023-03-12 11:46:56 -03:00
57e39d0ce9
Fix String.split() with empty string and delimeter
2023-02-02 01:34:11 +01:00
d95794ec8a
One Copyright Update to rule them all
...
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".
2023-01-05 13:25:55 +01:00
a479f5af22
Improve logic for detecting and tracking extensions
2022-11-24 21:48:16 +11:00
e791f4fce2
Double precision of String.split_floats
2022-11-20 12:29:50 +01:00
8a47a12207
Add support for empty delimiter in String.split
2022-11-04 15:09:12 +01:00
c60ac64e8f
Fix big negative numbers printing incorrect decimals in num_real
2022-10-15 17:57:54 -05:00
bf1a40c168
Make String.simplify_path keep the protocol identifier for urls
2022-10-13 12:23:49 +02:00