Utf8.insert: Difference between revisions
From GiderosMobile
Created page with "__NOTOC__ '''Available since:''' Gideros 2016.06<br/> === Description === Insert a substring to s. If idx is given, insert substring before char at this index, otherwise subst..." |
No edit summary |
||
| Line 4: | Line 4: | ||
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. | 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. | ||
<source lang="lua"> | <source lang="lua"> | ||
(string) | (string) = utf8.insert(s,idx,substring) | ||
</source> | </source> | ||
'''s | '''s''': (string) ''''''<br/> | ||
'''idx | '''idx''': (number) index where to insert '''optional'''<br/> | ||
'''substring | '''substring''': (string) '''optional'''<br/> | ||
'''Returns''' (string) new string<br/> | '''Returns''' (string) new string<br/> | ||
Revision as of 09:17, 23 August 2018
Available since: Gideros 2016.06
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.
(string) = utf8.insert(s,idx,substring)
's: (string) '
idx: (number) index where to insert optional
substring: (string) optional
Returns (string) new string