# HUD::GET_LENGTH_OF_LITERAL_STRING

- **Hash:** `0x481FBF588B0B76DB`
- **Namespace:** HUD
- **Runtime name (Lua/JS):** `GetLengthOfLiteralString`
- **Side:** client (game native)
- **Name status:** official
- **Documentation:** described
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/HUD/GET_LENGTH_OF_LITERAL_STRING

## Signature

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

## Parameters

- `string` (`const char*`)

## Returns

`int`

## Description

Returns the length of the string passed (much like strlen).

## Usage

### Lua

```lua
local retval = GetLengthOfLiteralString(string)

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

### JavaScript

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

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

### C#

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

*Sources: alloc8or RDR3 NativeDB.*
