HUDClient

getLengthOfLiteralString

GET_LENGTH_OF_LITERAL_STRING0xF030907CCBB8A9FD

The GTA V native GET_LENGTH_OF_LITERAL_STRING of the HUD namespace, as LS:MP client scripts call it: the global function getLengthOfLiteralString, in JavaScript and in Lua.

SignatureJavaScript
getLengthOfLiteralString(string: string): number
SignatureLua
getLengthOfLiteralString(string: string): integer

Usage

JavaScript
const result = getLengthOfLiteralString(string);
Lua
local result = getLengthOfLiteralString(string)

Parameters

ParameterTypeJavaScriptLua
stringstringstringstring

Returns

int JavaScript number, Lua integer

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

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

Reference

Namespace
HUD HUD
In the game
int GET_LENGTH_OF_LITERAL_STRING(const char* string)
Hash
0xF030907CCBB8A9FD

Open in the interactive natives reference