Difference between revisions of "Utf8.insert"

From GiderosMobile
m (Text replacement - "<source" to "<syntaxhighlight")
Line 5: Line 5:
 
=== <translate>Description</translate> ===
 
=== <translate>Description</translate> ===
 
<translate>Insert a substring to s. If idx is given, insert substring before char at this index, otherwise substring will concat to s. idx can be negative.</translate>
 
<translate>Insert a substring to s. If idx is given, insert substring before char at this index, otherwise substring will concat to s. idx can be negative.</translate>
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
(string) = utf8.insert(s,idx,substring)
 
(string) = utf8.insert(s,idx,substring)
 
</source>
 
</source>

Revision as of 15:32, 13 July 2023


Available since: Gideros 2016.06
Class: utf8

Description

Insert a substring to s. If idx is given, insert substring before char at this index, otherwise substring will concat to s. idx can be negative. <syntaxhighlight lang="lua"> (string) = utf8.insert(s,idx,substring) </source>

Parameters

s: (string)
idx: (number) index where to insert optional
substring: (string) optional

Return values

Returns (string) new string