LogoAntiRaid

@antiraid-ext/strings/splitn

API reference for @antiraid-ext/strings/splitn

@antiraid-ext/strings/splitn

Functions

string_splitn

Splits a string into a table of substrings, using a separator string.

Stops splitting after n substrings have been found or the end of the string is reached.

Function Signature
--- Splits a string into a table of substrings, using a separator string.
--- Stops splitting after n substrings have been found or the end of the string is reached.
---
--- @param str string The string to split.
--- @param sep string The separator string to use for splitting.
--- @param n number The maximum number of substrings to return.
--- @return A table of strings containing the substrings.
function string_splitn(str: string, sep: string, n: number) -> {string} end

Arguments

str

string The string to split.

string

sep

string The separator string to use for splitting.

string

n

number The maximum number of substrings to return.

number

Returns

A

table of strings containing the substrings.

{string}

Last updated on