Difference between revisions of "Utf8.remove"

From GiderosMobile
m (Text replacement - "<source" to "<syntaxhighlight")
 
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
<languages />
+
'''Available since:''' Gideros 2016.06<br/>
'''<translate>Available since</translate>:''' Gideros 2016.06<br/>
+
'''Class:''' [[utf8]]<br/>
'''<translate>Class</translate>:''' [[Special:MyLanguage/utf8|utf8]]<br/>
+
 
=== <translate>Description</translate> ===
+
=== Description ===
<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>
+
Deletes a substring in ''s''.
 
<syntaxhighlight lang="lua">
 
<syntaxhighlight lang="lua">
utf8.remove(s,start,stop)
+
utf8.remove(s,start,stop)
</source>
+
</syntaxhighlight>
=== <translate>Parameters</translate> ===
+
 
'''s''': (string) <translate></translate> <br/>
+
If neither ''start'' nor ''stop'' are given, deletes the last UTF-8 char in ''s'', otherwise deletes char from start to end of ''s''.
'''start''': (number) <translate></translate> '''optional'''<br/>
+
 
'''stop''': (number) <translate></translate> '''optional'''<br/>
+
If ''stop'' is given, deletes char from ''start'' to ''stop'' (include start and stop).
 +
 
 +
''start'' and ''stop'' can be negative.
 +
 
 +
=== Parameters ===
 +
'''s''': (string) <br/>
 +
'''start''': (number) '''optional'''<br/>
 +
'''stop''': (number) '''optional'''<br/>
  
 
{{Utf8}}
 
{{Utf8}}

Latest revision as of 23:14, 1 December 2023

Available since: Gideros 2016.06
Class: utf8

Description

Deletes a substring in s.

utf8.remove(s,start,stop)

If neither start nor stop are given, deletes the last UTF-8 char in s, otherwise deletes char from start to end of s.

If stop is given, deletes char from start to stop (include start and stop).

start and stop can be negative.

Parameters

s: (string)
start: (number) optional
stop: (number) optional