Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Unicode support to String.to_*_case() methods #75846

Merged
merged 1 commit into from
Feb 22, 2024

Conversation

dalexeev
Copy link
Member

@dalexeev dalexeev commented Apr 9, 2023

I think this is necessary because GDScript supports Unicode identifiers (#71676) and we have the editor/naming/default_signal_callback_name setting that should also support Unicode (#75814).

  • Add is_unicode_upper_case() and is_unicode_lower_case() functions.
  • Optimize is_unicode_identifier_start() and is_unicode_identifier_continue() functions by using binary search.

@dalexeev dalexeev requested review from a team as code owners April 9, 2023 09:10
core/string/ucaps.h Outdated Show resolved Hide resolved
Copy link
Contributor

@RevoluPowered RevoluPowered left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the surface it looks like a good change, having non english charset tests is something that improves things.

I think you should probably fix up the formatting though so that the define has clear edges and not \ characters misaligned.

core/string/char_utils.h Show resolved Hide resolved
tests/core/string/test_string.h Show resolved Hide resolved
tests/core/string/test_string.h Show resolved Hide resolved
@AThousandShips AThousandShips modified the milestones: 4.2, 4.3 Oct 26, 2023
@dalexeev dalexeev force-pushed the string-cases-unicode branch 2 times, most recently from ebe6dc9 to 2ad7dfa Compare February 22, 2024 10:45
@akien-mga akien-mga merged commit 49d7ad9 into godotengine:master Feb 22, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@dalexeev dalexeev deleted the string-cases-unicode branch February 22, 2024 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants