feat: add Rotate for string

This commit is contained in:
dudaodong committed 2024-09-03 16:35:38 +08:00
1 parent 63216d9b1c
commit 601df5dc12
5 files changed
+152 -15

No files matched your search

+15
View File
@@ -709,3 +709,18 @@ func ExampleEllipsis() {
// 你好...
// 😀😃😄...
}
func ExampleRotate() {
result1 := Rotate("Hello", 0)
result2 := Rotate("Hello", 1)
result3 := Rotate("Hello", 2)
fmt.Println(result1)
fmt.Println(result2)
fmt.Println(result3)
// Output:
// Hello
// oHell
// loHel
}