MCPcopy
hub / github.com/duke-git/lancet / ExampleRotate

Function ExampleRotate

strutil/string_example_test.go:728–741  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

726}
727
728func ExampleRotate() {
729 result1 := Rotate("Hello", 0)
730 result2 := Rotate("Hello", 1)
731 result3 := Rotate("Hello", 2)
732
733 fmt.Println(result1)
734 fmt.Println(result2)
735 fmt.Println(result3)
736
737 // Output:
738 // Hello
739 // oHell
740 // loHel
741}
742
743func ExampleTemplateReplace() {
744 template := `Hello, my name is {name}, I'm {age} years old.`

Callers

nothing calls this directly

Calls 1

RotateFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…