# HUD::GET_LENGTH_OF_LITERAL_STRING_IN_BYTES

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

## Signature

```c
int GET_LENGTH_OF_LITERAL_STRING_IN_BYTES(const char* string);
```

## Parameters

- `string` (`const char*`)

## Returns

`int`

## Usage

### Lua

```lua
local retval = GetLengthOfLiteralStringInBytes(string)

-- always available, by hash
local retval = Citizen.InvokeNative(0xDC5AD6B7AB8184F5, string, Citizen.ResultAsInteger())
```

### JavaScript

```js
const retval = GetLengthOfLiteralStringInBytes(string);

// by hash
const retval = Citizen.invokeNative('0xDC5AD6B7AB8184F5', string, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
```

### C#

```csharp
int retval = Function.Call<int>((Hash)0xDC5AD6B7AB8184F5, string);
```

*Sources: alloc8or RDR3 NativeDB.*
