RedM Natives

COMPARE_STRINGS

Hash0xBFBB74A15EFC149B
Runtime nameCompareStrings
NamespaceMISC
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x1E34710ECD4AB0EB

Signature

int COMPARE_STRINGS(const char* str1, const char* str2, BOOL matchCase, int maxLength);

Parameters

NameTypeDescription
str1const char*—
str2const char*—
matchCaseBOOL—
maxLengthint—

Returns int

Usage

Lua
local retval = CompareStrings(str1, str2, matchCase, maxLength)

-- always works, by hash
local retval = Citizen.InvokeNative(0xBFBB74A15EFC149B, str1, str2, matchCase, maxLength, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = CompareStrings(str1, str2, matchCase, maxLength);

// by hash
const retval = Citizen.invokeNative('0xBFBB74A15EFC149B', str1, str2, matchCase, maxLength, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
int retval = Function.Call<int>((Hash)0xBFBB74A15EFC149B, str1, str2, matchCase, maxLength);

Sources

alloc8or RDR3 NativeDB

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.