Documentation
¶
Overview ¶
Package strrev exports functions for reversing strings.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Reverse ¶
Reverse reverses the given string, maintaining the bytes within any multibyte unicode characters in their existing order so that the character is still rendered correctly.
Example ¶
package main import ( "fmt" "4d63.com/strrev" ) func main() { r := strrev.Reverse("abcde丂g") fmt.Println(r) }
Output: g丂edcba
func ReverseBytes ¶
ReverseBytes reverses the given byte slice, maintaining the bytes within any multibyte unicode characters in their existing order so that the character is still rendered correctly.
func ReverseCombining ¶ added in v1.1.0
ReverseCombining reverses the given string, maintaining the bytes within any multibyte and combining unicode characters in their existing order so that the character is still rendered correctly.
Example ¶
package main import ( "fmt" "4d63.com/strrev" ) func main() { r := strrev.ReverseCombining("abcdef\u0301\u031dg") fmt.Println(r) }
Output: gf̝́edcba
func ReverseCombiningBytes ¶ added in v1.1.0
ReverseCombiningBytes reverses the given byte slice, maintaining the bytes within any multibyte and combining unicode characters in their existing order so that the character is still rendered correctly.
Types ¶
This section is empty.