insert >>-insert(new-+---------------------------------------+-)------>< +-,--+---+--+-------------------------+-+ +-n-+ +-,--+--------+--+------+-+ +-length-+ +-,pad-+ Returns a copy of the receiver string with the string
[new]
, padded or truncated
to length
[length]
, inserted after
the
[n]
th character.
The default value for
[n]
is
String class - insert method "abc"~insert("123") -> "123abc" "abcdef"~insert(" ",3) -> "abc def" "abc"~insert("123",5,6) -> "abc 123 " "abc"~insert("123",5,6,"+") -> "abc++123+++" "abc"~insert("123", ,5,"-") -> "123--abc" |