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

Function TestInput_ReplaceFirstEmptyInput

stringy_test.go:251–257  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

249}
250
251func TestInput_ReplaceFirstEmptyInput(t *testing.T) {
252 replaceFirst := New("")
253 against := ""
254 if result := replaceFirst.ReplaceFirst("name", "nombre"); result != against {
255 t.Errorf("Expected: %s but got: %s", against, result)
256 }
257}
258
259func TestInput_ReplaceLast(t *testing.T) {
260 replaceLast := New("Hello My name is Roshan and his name is Alis.")

Callers

nothing calls this directly

Calls 2

NewFunction · 0.85
ReplaceFirstMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…