String
string.kern
Shared
Inserts spacing between each character in a string
Syntax
local result = string.kern(input, kerner = " ")Parameters
| Type | Name | Description |
|---|---|---|
string | input | String to be kerned |
string | kerner | Character(s) to insert between each character |
Returns
| Type | Name | Description |
|---|---|---|
string | result | Kerned string |
Examples
--Default kerning (single space)
local result = string.kern("HELLO")
engine.print(result) --H E L L O--Custom kerning with dash
local result = string.kern("ABC", "-")
engine.print(result) --A-B-C--Custom kerning with double space
local result = string.kern("LUA", " ")
engine.print(result) --L U A--Kerning with dots
local result = string.kern("123", ".")
engine.print(result) --1.2.3