insert method

String insert(
  1. int index,
  2. String str
)

Returns a new string in which a specified string is inserted at a specified index position in this instance.

Implementation

String insert(int index, String str) => (List<String>.from(this.toCharArray())..insert(index, str)).join();