RedM Natives

GET_LENGTH_OF_LITERAL_STRING

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

Hash0x481FBF588B0B76DB
Runtime nameGetLengthOfLiteralString
NamespaceHUD
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0xF030907CCBB8A9FD

Signature

int GET_LENGTH_OF_LITERAL_STRING(const char* string);

Parameters

NameTypeDescription
stringconst char*—

Returns int

Description

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

Usage

Lua
local retval = GetLengthOfLiteralString(string)

-- always works, by hash
local retval = Citizen.InvokeNative(0x481FBF588B0B76DB, string, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = GetLengthOfLiteralString(string);

// by hash
const retval = Citizen.invokeNative('0x481FBF588B0B76DB', string, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
int retval = Function.Call<int>((Hash)0x481FBF588B0B76DB, string);

Sources

alloc8or RDR3 NativeDB

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