Swift - 대소문자 바꾸기 (아스키코드, map) 2가지 방법
·
SwiftUI
func solution(_ my_string:String) -> String { return my_string.map { $0.isUppercase ? $0.lowercased() : $0.uppercased() }.joined()}func solution(_ my_string:String) -> String { var arr: String = "" for i in my_string { if i.asciiValue! > 96 { arr.append(Character(UnicodeScalar(i.asciiValue! - 32))) } else { arr.append(Character(UnicodeScalar(i.asciiVa..