Removed unused function

master
Aadhavan Srinivasan 5 days ago
parent 7cd24959bf
commit 74b37ff818

@ -2,7 +2,6 @@ package main
import ( import (
"slices" "slices"
"strings"
"unicode" "unicode"
) )
@ -159,17 +158,3 @@ func replaceByValue[T comparable](slc []T, toReplace T, replaceWith T) []T {
} }
return slc return slc
} }
// swapCase swaps the case of every character in the given string, and returns
// the new string.
func swapCase(str string) string {
return strings.Map(func(r rune) rune {
switch {
case unicode.IsLower(r):
return unicode.ToUpper(r)
case unicode.IsUpper(r):
return unicode.ToLower(r)
}
return r
}, str)
}

Loading…
Cancel
Save