Removed unused function

This commit is contained in:
2025-01-28 12:39:32 -05:00
parent 7cd24959bf
commit 74b37ff818

15
misc.go
View File

@@ -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)
}