Skip to content

il2cpp游戏的string类实现char*与std::string的转换和修改

Notifications You must be signed in to change notification settings

FateHack/MonoString

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

MonoString

il2cpp游戏的string类实现char*与std::string的转换和修改

使用方法

//public static string get_applicationBundleIdentifier() { }

MonoString *(*get_applicationBundleIdentifier)();
MonoString *$get_applicationBundleIdentifier() {
    MonoString *str = get_applicationBundleIdentifier();
    const char *s = str->toChars(); //转const char*
    std::string ss = str->toString(); //转std::string
    str->setMonoString("monoString"); 
    str->setMonoString(string("monoString"));
    return str;
}

About

il2cpp游戏的string类实现char*与std::string的转换和修改

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages