mirror of https://github.com/godotengine/godot
Merge 33a34fe670 into 15ff450680
This commit is contained in:
commit
2eec2ac1e7
|
|
@ -1921,13 +1921,6 @@ CharString String::ascii(bool p_allow_extended) const {
|
|||
return cs;
|
||||
}
|
||||
|
||||
String String::utf8(const char *p_utf8, int p_len) {
|
||||
String ret;
|
||||
ret.parse_utf8(p_utf8, p_len);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Error String::parse_utf8(const char *p_utf8, int p_len, bool p_skip_cr) {
|
||||
if (!p_utf8) {
|
||||
return ERR_INVALID_DATA;
|
||||
|
|
@ -2192,13 +2185,6 @@ CharString String::utf8() const {
|
|||
return utf8s;
|
||||
}
|
||||
|
||||
String String::utf16(const char16_t *p_utf16, int p_len) {
|
||||
String ret;
|
||||
ret.parse_utf16(p_utf16, p_len, true);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Error String::parse_utf16(const char16_t *p_utf16, int p_len, bool p_default_little_endian) {
|
||||
if (!p_utf16) {
|
||||
return ERR_INVALID_DATA;
|
||||
|
|
|
|||
|
|
@ -523,11 +523,19 @@ public:
|
|||
CharString ascii(bool p_allow_extended = false) const;
|
||||
CharString utf8() const;
|
||||
Error parse_utf8(const char *p_utf8, int p_len = -1, bool p_skip_cr = false);
|
||||
static String utf8(const char *p_utf8, int p_len = -1);
|
||||
static String utf8(const char *p_utf8, int p_len = -1) {
|
||||
String ret;
|
||||
ret.parse_utf8(p_utf8, p_len);
|
||||
return ret;
|
||||
}
|
||||
|
||||
Char16String utf16() const;
|
||||
Error parse_utf16(const char16_t *p_utf16, int p_len = -1, bool p_default_little_endian = true);
|
||||
static String utf16(const char16_t *p_utf16, int p_len = -1);
|
||||
static String utf16(const char16_t *p_utf16, int p_len = -1) {
|
||||
String ret;
|
||||
ret.parse_utf16(p_utf16, p_len, true);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static uint32_t hash(const char32_t *p_cstr, int p_len); /* hash the string */
|
||||
static uint32_t hash(const char32_t *p_cstr); /* hash the string */
|
||||
|
|
|
|||
Loading…
Reference in New Issue