8d1c1c5867
Merge pull request #92476 from AThousandShips/string_remove_char
...
Add `String::remove_char(s)` methods for performance and convenience
2025-03-10 10:01:04 -05:00
331a43a9d8
Add String::remove_char(s) methods for performance and convenience
2025-03-10 13:19:28 +01:00
605b62cd29
Add Span struct (replacing StrRange). Spans represent read-only access to a contiguous array, resembling std::span.
2025-03-09 18:19:51 +01:00
3a0b8da168
Merge pull request #101304 from Ivorforce/string-parse-ascii
...
Add `String::ascii` creator functions, to parse a char buffer as ASCII.
2025-03-09 09:05:28 -05:00
324512e11c
Style: Replace header guards with #pragma once
2025-03-07 17:33:47 -06:00
b6cfcdeab5
Add String::ascii creator functions, to parse a char buffer as ASCII.
...
The function will log errors if any characters above value 127 are found.
2025-03-08 00:01:27 +01:00
3275116304
Rename "file" param for str.path_join() to "path"
2025-02-25 15:58:33 +01:00
512abc38b2
Remove implicit conversions from String, Char16String and CharString to data pointers. Make conversions to StrRange implicit to aid transition.
2025-01-17 17:31:58 +01:00
2aeca3e885
Optimize String::chr to avoid calling strlen. Use String::chr instead of String(&chr, 1) where appropriate.
2025-01-10 18:06:46 +01:00
416a86f47c
Merge pull request #100434 from Ivorforce/string-copy-from-rename
...
Rename `String::copy_from` functions to their respective encodings (`parse_latin1`, `parse_wstring`, `parse_utf32`).
2024-12-19 19:59:57 -06:00
be86ce3103
Apply iwyu suggestion in core.
2024-12-19 00:43:47 +08:00
df3e9291c6
Rename String::copy_from functions to their respective encodings (parse_latin1, parse_wstring, parse_utf32).
2024-12-15 21:46:50 +01:00
57073ba14e
Add move constructor and move assignment to CowData, String, Char16String, CharString and Vector.
2024-12-11 15:52:15 +01:00
a3f48f7047
Optimize String construction from statically known strings allowing strlen to be evaluated at compile time, where possible.
2024-12-09 21:47:28 +01:00
b5c31ebb41
Add contains_char() for single-character 'contains' calls.
2024-12-06 20:23:35 +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
0d350e7108
Set clang-format RemoveSemicolon rule to true
...
- Set clang-format `Standard` rule to `c++20`
2024-10-25 13:49:43 -04:00
5c0f2414cd
Always add decimal when printing float
2024-10-23 15:00:21 +02: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
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
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
9bcda8f94c
Prefer family name in fonts' names table
2024-04-06 16:08:59 +08:00
2cbf469912
Fix sorting of files/dirs in dialogs
...
Sorts leading `_` before other characters except `.`.
2024-03-20 13:45:47 +01:00
9903e6779b
Enforce template syntax typename over class
2024-03-07 22:39:09 -06:00
d70c45b5c8
Add option to add built-in strings in the POT generation
2024-02-28 11:34:26 -03:00
a8bc9f3e78
Add const lvalue ref to core/* container parameters
2024-02-14 11:20:36 -03:00
b66d16fcc9
Merge pull request #84375 from Rubonnek/use-const-reference
...
Add const references in `String` class
2024-01-04 14:25:27 +01:00
edcad2ea88
Allow auto-generated node names in PopupMenu::add_submenu_item
2023-11-09 17:12:41 +01:00
dbc49d2a68
Add const references in String class
2023-11-02 13:49:39 -04:00
20e24bd2bb
Merge pull request #78529 from Chaosus/string_reverse
...
Add `String.reverse` method
2023-08-16 16:53:40 +02: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
5ade250c7d
Merge pull request #76735 from AThousandShips/natural_cmp
...
Add `naturalcasecmp_to` function to `String`
2023-05-09 17:44:37 +02:00
46a7018e3c
Add naturalcasecmp_to function to String
...
Functions as a complement to `naturalnocasecmp_to`
2023-05-07 10:17:53 +02: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
ca0feabbb0
add hex_decode() to String
2023-04-05 19:44:00 +07:00
d72b563250
Add GDScript to_wchar_buffer and get_string_from_wchar functions.
2023-03-21 15:39:54 +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
39922d7167
Handle gltf binary
...
[ Ignore and Warn | Extract Textures (default) | Optimize Loading Embedded as Basisu ]
Enable compressed mip maps from Basis Universal for faster compressions.
Increase the quality of Basis to avoid corruption.
To keep compatibility use the first mip of the previous internal Godot format.
Because texture names may have invalid filename characters, adds String::validate_filename to sanitize filenames for import pipeline use.
2023-01-27 02:02:02 -08: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
207e52c161
Fix String::word_wrap() for long words
...
- Changes `TextServer.string_get_word_breaks()`
- Returns pairs of boundary start and end offsets
- Accepts `chars_per_line` to return line breaks
- Removes `String::word_wrap()`
Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com >
2022-12-16 13:18:57 +08: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