You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ok, you're specifically referring to UTF8 correct?
If so, could you update the bug title to reflect that? I assume you're aware that there are already string conversions for existing char*, std::string etc.
So, I took a pass through your conversion code, and had a chance to think a bit on this myself.
I think your conversion may be simple a subset of the behaviour LocalString already supports.
The former case is a function that takes in a std::string and performs a conversion to UTF16 from UTF8. I believe just using a regular ctor is equivalent?
The latter converts from a UTF16 string to a regular std::string, however, LocalString just directly asks for a UTF8 string, so you're probably just making your conversion explicit, or making an unnecessary one (I don't know what the JVM does internally).
That said, in C++20, UTF16 has its own view std::filesystem::path::u16string. Here, calling GetUtfString could actually be efficiently represented. So, I think this should be revisited when C++20 support is added, but I think your conversion methods are already covered.
Hi,
I want suggest to add string convertion methods, example:
https://github.com/xplpc/xplpc/blob/main/jni/lib/src/xplpc/jni/support.cpp
Since this library will solve JNI problems, why not methods to work with String convertions :)
Thanks.
The text was updated successfully, but these errors were encountered: