diff --git a/misc.go b/misc.go index fb22c21..96d43a1 100644 --- a/misc.go +++ b/misc.go @@ -2,7 +2,6 @@ package main import ( "slices" - "strings" "unicode" ) @@ -159,17 +158,3 @@ func replaceByValue[T comparable](slc []T, toReplace T, replaceWith T) []T { } 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) -}