MCPcopy Create free account
hub / github.com/g3n/engine / StrRemove

Function StrRemove

text/str.go:41–45  ·  view source on GitHub ↗

StrRemove removes the rune from the specified string and position

(s string, col int)

Source from the content-addressed store, hash-verified

39
40// StrRemove removes the rune from the specified string and position
41func StrRemove(s string, col int) string {
42
43 start, length := StrFind(s, col)
44 return s[:start] + s[start+length:]
45}
46
47// StrInsert inserts a string at the specified character position
48func StrInsert(s, data string, col int) string {

Callers 2

CursorBackMethod · 0.92
CursorDeleteMethod · 0.92

Calls 1

StrFindFunction · 0.85

Tested by

no test coverage detected