# MISC::COMPARE_STRINGS

- **Hash:** `0xBFBB74A15EFC149B`
- **Namespace:** MISC
- **Runtime name (Lua/JS):** `CompareStrings`
- **Side:** client (game native)
- **Name status:** official
- **Documentation:** named only
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/MISC/COMPARE_STRINGS

## Signature

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

## Parameters

- `str1` (`const char*`)
- `str2` (`const char*`)
- `matchCase` (`BOOL`)
- `maxLength` (`int`)

## Returns

`int`

## Usage

### Lua

```lua
local retval = CompareStrings(str1, str2, matchCase, maxLength)

-- always available, by hash
local retval = Citizen.InvokeNative(0xBFBB74A15EFC149B, str1, str2, matchCase, maxLength, Citizen.ResultAsInteger())
```

### JavaScript

```js
const retval = CompareStrings(str1, str2, matchCase, maxLength);

// by hash
const retval = Citizen.invokeNative('0xBFBB74A15EFC149B', str1, str2, matchCase, maxLength, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
```

### C#

```csharp
int retval = Function.Call<int>((Hash)0xBFBB74A15EFC149B, str1, str2, matchCase, maxLength);
```

*Sources: alloc8or RDR3 NativeDB.*
