klyn.StringBuilderSync.insert
method
public insert(position as UInt, char as CodeUnit) as StringBuilderSync throws IndexException:
Description

Inserts one UTF-16 code unit.

Parameters
ParameterDescription
positionInsertion position between 0 and length.
charCode unit to insert.
Returns

This builder.

Throws
  • IndexException if position is outside [0, length].
Example
builder = StringBuilderSync()
builder.append("Kyn")
builder.insert(2u, `l`)
print(builder.toString())