StrInsert inserts a string at the specified character position
(s, data string, col int)
| 46 | |
| 47 | // StrInsert inserts a string at the specified character position |
| 48 | func StrInsert(s, data string, col int) string { |
| 49 | |
| 50 | start, _ := StrFind(s, col) |
| 51 | return s[:start] + data + s[start:] |
| 52 | } |
| 53 | |
| 54 | // StrPrefix returns the prefix of the specified string up to |
| 55 | // the specified character position |