0 votes

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.

asked Dec 31, 2019 in Engine by alireza49 (14 points)
edited Jan 1 by alireza49

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 How to use this Q&A? before posting your first questions.