+1 vote

in GDscript we can converts value of utf8 which are stroed in PoolByteArray to string using getstringfrom_utf8 function in String. i want to know is there any way to do this in c++ nativescript?? i looked at the godot String class in c++ and there isn't such function there, so is it possible at all?

thank you in advance.

in Engine by (24 points)
edited by

i think the answer is to use one of the String class constructor, which takes a const char *. first we need to convert poolbytearray to char*, using "poolbytearray().read().ptr()". but i'm not sure if its correct or not

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.