mirror of
https://github.com/godotengine/godot-cpp.git
synced 2026-01-05 02:10:14 +03:00
Implement String::resize()
This commit is contained in:
@@ -128,6 +128,7 @@ GDExtensionInterfaceStringOperatorPlusEqChar gdextension_interface_string_operat
|
||||
GDExtensionInterfaceStringOperatorPlusEqCstr gdextension_interface_string_operator_plus_eq_cstr = nullptr;
|
||||
GDExtensionInterfaceStringOperatorPlusEqWcstr gdextension_interface_string_operator_plus_eq_wcstr = nullptr;
|
||||
GDExtensionInterfaceStringOperatorPlusEqC32str gdextension_interface_string_operator_plus_eq_c32str = nullptr;
|
||||
GDExtensionInterfaceStringResize gdextension_interface_string_resize = nullptr;
|
||||
GDExtensionInterfaceXmlParserOpenBuffer gdextension_interface_xml_parser_open_buffer = nullptr;
|
||||
GDExtensionInterfaceFileAccessStoreBuffer gdextension_interface_file_access_store_buffer = nullptr;
|
||||
GDExtensionInterfaceFileAccessGetBuffer gdextension_interface_file_access_get_buffer = nullptr;
|
||||
@@ -311,6 +312,7 @@ GDExtensionBool GDExtensionBinding::init(GDExtensionInterfaceGetProcAddress p_ge
|
||||
LOAD_PROC_ADDRESS(string_operator_plus_eq_cstr, GDExtensionInterfaceStringOperatorPlusEqCstr);
|
||||
LOAD_PROC_ADDRESS(string_operator_plus_eq_wcstr, GDExtensionInterfaceStringOperatorPlusEqWcstr);
|
||||
LOAD_PROC_ADDRESS(string_operator_plus_eq_c32str, GDExtensionInterfaceStringOperatorPlusEqC32str);
|
||||
LOAD_PROC_ADDRESS(string_resize, GDExtensionInterfaceStringResize);
|
||||
LOAD_PROC_ADDRESS(xml_parser_open_buffer, GDExtensionInterfaceXmlParserOpenBuffer);
|
||||
LOAD_PROC_ADDRESS(file_access_store_buffer, GDExtensionInterfaceFileAccessStoreBuffer);
|
||||
LOAD_PROC_ADDRESS(file_access_get_buffer, GDExtensionInterfaceFileAccessGetBuffer);
|
||||
|
||||
@@ -289,6 +289,10 @@ CharWideString String::wide_string() const {
|
||||
return str;
|
||||
}
|
||||
|
||||
Error String::resize(int p_size) {
|
||||
return (Error)internal::gdextension_interface_string_resize(_native_ptr(), p_size);
|
||||
}
|
||||
|
||||
String &String::operator=(const char *p_str) {
|
||||
*this = String(p_str);
|
||||
return *this;
|
||||
|
||||
Reference in New Issue
Block a user