Type Function Library utf8.* Return value String Revision 2017.3060 Keywords utf8, UTF-8, Unicode, string, remove See also utf8.insert()
Deletes a substring from a
If end
is not specified, this function deletes characters from start
until the end of the string (s
).
If end
is specified, this function deletes characters from start
to end
, inclusive of both.
Note that start
and end
can be negative if you need to count from the end of the string.
utf8.remove( s, start [, end] )
String. The string to operate on.
Number. The starting position.
Number. Ending position. Default is the number of characters in the string.
local utf8 = require( "plugin.utf8" ) local testStr = "♡ 你好,世界 ♡" print( utf8.remove( testStr, 5, 7 ) ) --> ♡ 你好 ♡