Lukas Tenbrink
1db0a60dc0
Replace std::size
usage with std_size
to avoid <iterator>
include.
2025-10-05 00:26:11 +02:00
Thaddeus Crews
f6fc2f4a08
Core: Remove skip_cr
argument from String
2025-09-28 10:07:24 -05:00
Aaron Franke
15de1d6c35
Use Grisu2 algorithm in String::num_scientific to fix serializing
2025-05-22 09:13:16 -07:00
Thaddeus Crews
717df3ee88
Merge pull request #105249 from Repiteo/core/math-defs-namespace
...
Core: Use `Math` namespace for constants
2025-04-11 09:51:04 -05:00
Thaddeus Crews
94282d88f9
Core: Use Math
namespace for constants
2025-04-10 16:29:30 -05:00
Priahoud
bf963e767e
Add Options, Functions and Settings to convert Node-Names and Strings to kebab-case
...
- refactored and renamed String::_camelcase_to_underscore to String:_separate_compound_words
- refactored String::to_snake_case to work with the refactored String::_separate_compound_words
- created char_utils::is_hyphen to catch all hyphen variants in kebab-case conversion
- created String::to_kebab_case using the new String::_separate_compound_words
- created corresponding Documentation in String and StringName
- simplified both switch statements in EditorNode and ProjectDialog
- added new kebab-casing Option for Node Names in ProjectSettings
- added missing camelCase Options to Scene- and Node-Names in ProjectSettings
- simplified Mono RuntimeInterop Functions
- hooked up the ConnectionsDialog
- created additional Unit Tests
2025-04-10 21:22:21 +02:00
A Thousand Ships
889410dcda
Add String::replace_char(s)
methods for performance and convenience
2025-04-10 13:08:45 +02:00
Pāvels Nadtočajevs
9abe2e5294
Add uri_file_decode
to handle +
in file names.
2025-04-07 23:49:17 +03:00
Lukas Tenbrink
ffa6ef220b
Use append_
instead of parse_
for String
methods.
2025-03-27 17:51:02 +01:00
Thaddeus Crews
7fed5f29ed
Merge pull request #99826 from kiroxas/improveParseUTF8Performance
...
Improve `parse_utf8` performance
2025-03-24 10:00:55 -05:00
kobewi
10f6c01b9c
Remove ABS in favor of Math::abs
2025-03-19 13:52:40 +01:00
Lukas Tenbrink
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
Thaddeus Crews
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
Julian
659d1b5d0c
Fix crash caused by trailing spaces
2025-03-11 00:06:08 -04:00
A Thousand Ships
331a43a9d8
Add String::remove_char(s)
methods for performance and convenience
2025-03-10 13:19:28 +01:00
Thaddeus Crews
324512e11c
Style: Replace header guards with #pragma once
2025-03-07 17:33:47 -06:00
Lukas Tenbrink
e34f1f504c
Use std::size
instead of sizeof(a) / sizeof(a[0])
pattern throughout the codebase.
2025-02-07 14:57:48 +01:00
Pāvels Nadtočajevs
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
bruvzg
3be46a69c4
Fix uppercase B and X parsing in the integer literals.
2025-02-05 16:02:06 +02:00
Kiro
e4f8a7f8cf
improveParseUTF8Performance
2024-12-16 09:55:11 +01:00
demolke
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
Thaddeus Crews
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
Thaddeus Crews
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
Adam Johnston
3ac043c508
Add fuzzy string matching to quick open search
...
Co-authored-by: sam <samsface@gmail.com>
2024-10-28 11:24:36 -07:00
kobewi
5c0f2414cd
Always add decimal when printing float
2024-10-23 15:00:21 +02:00
yeojunh
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
Pablo Andres Fuente
0b258e69f3
Add unit tests for String::parse_url()
2024-10-01 17:09:22 -03:00
Haoyu Qiu
6516ca6b11
Parse fragment from URL
2024-09-27 19:42:30 +08:00
Haoyu Qiu
a751c05b15
Fix script editor wrongly replaces and quotes non-ASCII letters
2024-09-23 00:05:16 +08:00
Mika Viskari
3153e9afda
Added more unit tests for String insert and join.
2024-08-29 20:05:44 +03:00
Haoyu Qiu
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
Rémi Verschelde
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
Haoyu Qiu
f483c3aafa
Fix split_floats behavior when spaces are used as separators
2024-08-16 17:30:44 +08:00
jsjtxietian
6cf9af2817
Fix error when use relative #include in .gdshader / .gdshaderinc file
2024-08-08 11:59:14 +08:00
A Thousand Ships
b4c6cc7d82
[Core] Add case-insensitive String::containsn
2024-05-08 12:48:01 +02:00
Wilson E. Alvarez
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
A Thousand Ships
bb6305d1c4
[Core] Fix incorrect file sort method
2024-03-24 17:54:57 +01:00
A Thousand Ships
2cbf469912
Fix sorting of files/dirs in dialogs
...
Sorts leading `_` before other characters except `.`.
2024-03-20 13:45:47 +01:00
Mika Viskari
3026b566b0
Fix String::begins_with when both strings are empty
2024-03-05 20:46:10 +02:00
Danil Alexeev
c0aa88ae4f
Add Unicode support to String.to_*_case()
methods
2024-02-22 13:58:46 +03:00
Mika Viskari
5e40124d4d
Add more C++ unit tests for String to number conversions
2023-12-02 20:54:48 +02:00
Alfonso J. Ramos
5cd7ca0ccc
Do not replace starting digit with underscore when making identifier
2023-10-04 08:05:04 -05:00
bruvzg
2b3bbde6da
[String] Fix string conversion for -0.0 float values.
2023-09-05 11:32:55 +03:00
Rémi Verschelde
20e24bd2bb
Merge pull request #78529 from Chaosus/string_reverse
...
Add `String.reverse` method
2023-08-16 16:53:40 +02:00
Hugo Locurcio
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
MewPurPur
cc5500f7de
Fix erroneous pad_zeros warning
2023-07-08 16:16:01 +03:00
Rémi Verschelde
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
Yuri Roubinski
230385b587
Add String.reverse
method
2023-06-21 20:40:48 +03:00
Clay John
7a13cf9aeb
Merge pull request #75510 from SilicDev/string_erase
...
Reimplement `String.erase()` as immutable method
2023-05-05 10:03:49 -07:00
SilicDev
6fa4f71ca6
Reimplement String.erase
2023-05-04 00:52:35 +02:00