Skip to content

Instantly share code, notes, and snippets.

Last active Dec 16, 2019
What would you like to do?
package main
import (
func main() {
s := []rune("helloworld")
s1 := []rune(s[0:5])
fmt.Println("before: ",string(s1))
sort.Slice(s1, func (i,j int) bool{
return s1[i]<s1[j]
fmt.Println("after: ", string(s1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment