mirror of
https://github.com/duke-git/lancet.git
synced 2026-11-16 05:12:11 +08:00
feat: add Rotate for string
This commit is contained in:
1 parent
63216d9b1c
commit
601df5dc12
5 files changed
+152
-15
No files matched your search
@@ -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
|
||||
}
|
||||
Reference in new issue
Block a user