COMPARE_STRINGS
Compares str1 and str2 up to maxLength characters, honoring matchCase. Returns 0 if they match, or a negative or positive value otherwise.
Signature
int COMPARE_STRINGS(const char* str1, const char* str2, BOOL matchCase, int maxLength); // 0xBFBB74A15EFC149B b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | str1 | const char* |
| 2 | str2 | const char* |
| 3 | matchCase | BOOL |
| 4 | maxLength | int |
Facts
| Name | COMPARE_STRINGS |
|---|---|
| Hash | 0xBFBB74A15EFC149B |
| Namespace | |
| Returns | int |
| Game build | 1207 |
Examples
Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.
local result = Citizen.InvokeNative(0xBFBB74A15EFC149B, -- COMPARE_STRINGS
"text", -- const char* str1
"text", -- const char* str2
false, -- BOOL matchCase
0, -- int maxLength
Citizen.ResultAsInteger()
)
print(result)const result = Citizen.invokeNative("0xBFBB74A15EFC149B", // COMPARE_STRINGS
"text", // const char* str1
"text", // const char* str2
false, // BOOL matchCase
0, // int maxLength
Citizen.resultAsInteger()
);
console.log(result)int result = Function.Call<int>((Hash)0xBFBB74A15EFC149B, // COMPARE_STRINGS
"text", // const char* str1
"text", // const char* str2
false, // BOOL matchCase
0 // int maxLength
);Related MISC natives
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.