import Foundation
func removeNonASCII(_ input: String) -> String {
return input.filter { $0.asciiValue ?? 128 <= 127 }
}
let input = "©€ABC£µ¥xyz!® 123 こんにちは"
let filtered = removeNonASCII(input)
print("Filtered string: \(filtered)")
/*
run:
Filtered string: ABCxyz! 123
*/