utf8.remove | Multi Theft Auto: Wiki Skip to content

utf8.remove

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function removes a substring in a UTF-8 string by using a position range.

Syntax

utf8.remove ( )

Code Examples

server

This example shows how to remove substrings from strings.

-- Keep the first and last character
local input = "яблоко"
local output = utf8.remove( input, 2, -2 )
print( output ) -- яо
-- Remove the last character
local input = "Банан"
local output = utf8.remove( input, -1, -1 )
print( output ) -- Бана

See Also