Godot doesn’t uses STL, and has no clue about what std::string is. You should use the String class provided by Godot. If you can’t, try converting your_std_string.c_str() in a String instead.
It also has to be converted because Godot uses wchar_t characters, which are 2-bytes long. std::string has 1-byte characters. If you still want to use the STL, std::wstring might be easier to work with.
Is their an example of how to use the string type?
Catprog | 2016-06-26 12:17
Well, everywhere in the engine
It’s a pretty straightforward class, it has concatenation, copy, find, substring etc.
It should be available if you already included variant.h in your C++ file.
You can have a look at the header: https://github.com/godotengine/godot/blob/master/core/ustring.h
Zylann | 2016-06-26 12:28
So to use it in the module I just need to
1)replace std::string with String
2) remove the #include
Then use the ascii method to get a vector of chars to work with. (I think the class I am including only handles ascii)
4)Create a new String with the resulting data.
(It appears that their is already a function for the other code sha256_text().
Thank you for your help. I will try it out when I get time,