LogoAntiRaid

@antiraid-ext/strings/strip

API reference for @antiraid-ext/strings/strip

@antiraid-ext/strings/strip

Functions

string_strip

Strips a set of characters from the beginning and end of a string.

Function Signature
--- Strips a set of characters from the beginning and end of a string.
---
--- @param str string The string to strip.
--- @param chars string? The characters to strip. Defaults to whitespace characters (" \t\n\r").
--- @return string The stripped string.
--- @return number The index of the last character in the stripped string.
function string_strip(str: string, chars: string?) -> (string, number) end

Arguments

str

string The string to strip.

string

chars

string? The characters to strip. Defaults to whitespace characters (" \t\n\r").

This field is optional and may not be specified

string?

Returns

number

The index of the last character in the stripped string.

string

ret2

number

Last updated on