En GDScript de Godot 4.3

a = "A".to_ascii_buffer()[0] # Faster, but assumes ASCII/Latin-1 characters
b = "B".to_utf8_buffer()[0] # Slower, but supports UTF-8
c = "C".unicode_at(0) # Returns as a single int value, instead of PackedByteArray

Categories:

Tags:

No responses yet

Leave a Reply

Your email address will not be published. Required fields are marked *