-
Notifications
You must be signed in to change notification settings - Fork 208
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
Decide whether to expose godot_char_string
publicly
#993
Comments
chitoyuu
added
feature
Adds functionality to the library
c: core
Component: core (mod core_types, object, log, init, ...)
labels
Dec 7, 2022
For reference, here's the godot-cpp API: class CharString {
friend class String;
godot_char_string _char_string;
public:
~CharString();
int length() const;
const char *get_data() const;
};
class String {
...
public:
CharString utf8() const;
CharString ascii(bool p_extended = false) const;
} If this is added, it would need some good documentation to differentiate it from |
It might also be confusing that a I agree that it should probably stay out of the prelude at the very least. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Created during survey of commented code (#377).
godot_char_string
is a Godot string type representing a byte string of some encoding. It is currently used internally in the#[doc(hidden)]
Utf8String
type in the conversion process fromGodotString
to the RustString
.Reasons we might want this type to become public (likely with a re-designed API):
char_string
s inascii
andascii_extended
encodings, that could be interesting.Reasons we might want to remove it altogether in favor of inline FFI calls in conversion:
&[c_char]
getter.The text was updated successfully, but these errors were encountered: