fivem-ts

a library to speed up the development of Fivem scripts and frameworks


Project maintained by Purpose-Dev Hosted on GitHub Pages — Theme by mattgraham

fivem-ts - Documentation v0.7.5Docs


fivem-ts - Documentation v0.7.5 / Shared / stringToArray

Function: stringToArray()

stringToArray(input): string[]

Converts a string into an array of substrings, each with a maximum length of 99 characters.

Parameters

input: string

The input string to be split.

Returns

string[]

An array of substrings, each up to 99 characters long.

Example

const result = stringToArray("This is a very long string that needs to be split.");
console.log(result); // ["This", "is", "a", "very", "long", "string", "that", "needs", "to", "be", "split"]

Defined in

shared/utils/FString.ts:13