MCPcopy Create free account
hub / github.com/GrowthEase/GameSentry / Il2CppString

Class Il2CppString

lib/component/agent/structs/string.js:6–37  ·  view source on GitHub ↗

Represents a `Il2CppString`.

Source from the content-addressed store, hash-verified

4
5/** Represents a `Il2CppString`. */
6class Il2CppString extends native_struct.NativeStruct {
7 /** Gets the content of this string. */
8 get content() {
9 return Il2Cpp.Api._stringChars(this).readUtf16String(this.length);
10 }
11
12 /** Sets the content of this string. */
13 set content(value) {
14 Il2Cpp.Api._stringChars(this).writeUtf16String(value);
15 Il2Cpp.Api._stringSetLength(this, value.length);
16 }
17
18 /** Gets the length of this string. */
19 get length() {
20 return Il2Cpp.Api._stringLength(this);
21 }
22
23 /** Gets the encompassing object of the current string. */
24 get object() {
25 return new Il2Cpp.Object(this);
26 }
27
28 /** */
29 toString() {
30 return this.isNull() ? "null" : `"${this.content}"`;
31 }
32
33 /** Creates a new string with the specified content. */
34 static from(content) {
35 return new Il2Cpp.String(Il2Cpp.Api._stringNew(Memory.allocUtf8String(content || "")));
36 }
37}
38
39Il2Cpp.String = Il2CppString;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected