Difference between revisions of "Utf8.remove"
From GiderosMobile
m (Text replacement - "<source" to "<syntaxhighlight") |
|||
Line 5: | Line 5: | ||
=== <translate>Description</translate> === | === <translate>Description</translate> === | ||
<translate>Delete a substring in s. If neither start nor stop is given, delete the last UTF-8 char in s, otherwise delete char from start to end of s. if stop is given, delete char from start to stop (include start and stop). start and stop can be negative</translate> | <translate>Delete a substring in s. If neither start nor stop is given, delete the last UTF-8 char in s, otherwise delete char from start to end of s. if stop is given, delete char from start to stop (include start and stop). start and stop can be negative</translate> | ||
− | < | + | <syntaxhighlight lang="lua"> |
utf8.remove(s,start,stop) | utf8.remove(s,start,stop) | ||
</source> | </source> |
Revision as of 14:32, 13 July 2023
Available since: Gideros 2016.06
Class: utf8
Description
Delete a substring in s. If neither start nor stop is given, delete the last UTF-8 char in s, otherwise delete char from start to end of s. if stop is given, delete char from start to stop (include start and stop). start and stop can be negative <syntaxhighlight lang="lua">
utf8.remove(s,start,stop)
</source>
Parameters
s: (string)
start: (number) optional
stop: (number) optional