Removed unused function
This commit is contained in:
		
							
								
								
									
										15
									
								
								misc.go
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								misc.go
									
									
									
									
									
								
							@@ -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)
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user