Skip to content

String::resize() isn't exposed to GDExtension #1141

@dsnopek

Description

@dsnopek

Godot version

v4.1.beta.custom_build.19c1d3c7a

godot-cpp version

4.1.dev (1bc9ca7)

System information

Linux

Issue description

Presently, there is no String::resize() method, like we have available in Godot modules.

This is limiting, because it requires that we create a new char[], put the data in there, and then copy from the char[] into the string, and then delete it.

This was discovered when trying to compile the text_server_adv module in Godot as a GDExtension.

See: godotengine/godot#77532

Steps to reproduce

# Assuming you have Godot's source code in 'godot' cd godot/modules/text_server_adv/gdextension_build scons

Minimal reproduction project

n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementThis is an enhancement on the current functionalitytopic:gdextensionThis relates to the new Godot 4 extension implementation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions