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 characterlocal input = "яблоко"local output = utf8.remove( input, 2, -2 )print( output ) -- яо
-- Remove the last characterlocal input = "Банан"local output = utf8.remove( input, -1, -1 )print( output ) -- Бана