mirror of
https://github.com/Relintai/gdnative_cpp.git
synced 2024-11-20 10:57:23 +01:00
Added Char16String.
This commit is contained in:
parent
e0d3ab5ea5
commit
96864fbabb
@ -56,6 +56,18 @@ public:
|
|||||||
const char *get_data() const;
|
const char *get_data() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class Char16String {
|
||||||
|
friend class String;
|
||||||
|
|
||||||
|
pandemonium_char_16_string _char_string;
|
||||||
|
|
||||||
|
public:
|
||||||
|
~Char16String();
|
||||||
|
|
||||||
|
int length() const;
|
||||||
|
const char16_t *get_data() const;
|
||||||
|
};
|
||||||
|
|
||||||
class String {
|
class String {
|
||||||
pandemonium_string _pandemonium_string;
|
pandemonium_string _pandemonium_string;
|
||||||
|
|
||||||
|
@ -54,6 +54,18 @@ const char *pandemonium::CharString::get_data() const {
|
|||||||
return pandemonium::api->pandemonium_char_string_get_data(&_char_string);
|
return pandemonium::api->pandemonium_char_string_get_data(&_char_string);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pandemonium::Char16String::~Char16String() {
|
||||||
|
pandemonium::api->pandemonium_char_16_string_destroy(&_char_string);
|
||||||
|
}
|
||||||
|
|
||||||
|
int pandemonium::Char16String::length() const {
|
||||||
|
return pandemonium::api->pandemonium_char_16_string_length(&_char_string);
|
||||||
|
}
|
||||||
|
|
||||||
|
const char16_t *pandemonium::Char16String::get_data() const {
|
||||||
|
return pandemonium::api->pandemonium_char_16_string_get_data(&_char_string);
|
||||||
|
}
|
||||||
|
|
||||||
String String::num(double p_num, int p_decimals) {
|
String String::num(double p_num, int p_decimals) {
|
||||||
return String(pandemonium::api->pandemonium_string_num_with_decimals(p_num, p_decimals));
|
return String(pandemonium::api->pandemonium_string_num_with_decimals(p_num, p_decimals));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user