MCPcopy Create free account
hub / github.com/gobeam/stringy / ReplaceLast

Method ReplaceLast

stringy.go:296–299  ·  view source on GitHub ↗

ReplaceLast takes two param search and replace it return string by searching search sub string and replacing it with replace substring on last occurrence it can be chained on function which return StringManipulation interface

(search, replace string)

Source from the content-addressed store, hash-verified

294// with replace substring on last occurrence
295// it can be chained on function which return StringManipulation interface
296func (i *input) ReplaceLast(search, replace string) string {
297 input := getInput(*i)
298 return replaceStr(input, search, replace, Last)
299}
300
301// Reverse reverses the passed strings
302// it can be chained on function which return StringManipulation interface

Callers

nothing calls this directly

Calls 2

getInputFunction · 0.85
replaceStrFunction · 0.85

Tested by

no test coverage detected