Skip to content

Instantly share code, notes, and snippets.

@elulcao
Created June 21, 2022 21:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elulcao/68bcaa9bac51b5561c79cc74d6a93e99 to your computer and use it in GitHub Desktop.
Save elulcao/68bcaa9bac51b5561c79cc74d6a93e99 to your computer and use it in GitHub Desktop.
Get next rune with Go
// getNextRune returns the next rune in the alphabet
func getNextRune(ch rune) rune {
return (ch+1-'a')%('z'-'a'+1) + 'a'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment