HUDClient

getLengthOfLiteralStringInBytes

GET_LENGTH_OF_LITERAL_STRING_IN_BYTES0x43E4111189E54F0E

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

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

Usage

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

Parameters

ParameterTypeJavaScriptLua
stringstringstringstring

Returns

int JavaScript number, Lua integer

Reference

Namespace
HUD HUD
In the game
int GET_LENGTH_OF_LITERAL_STRING_IN_BYTES(const char* string)
Hash
0x43E4111189E54F0E
Formerly
_GET_LENGTH_OF_STRING

Open in the interactive natives reference