Sha256: 62f8992d15b025d5b51be426f76d6fb4e3efd87c50f10a730f318f36c2a6f198
Contents?: true
Size: 590 Bytes
Versions: 364
Compression:
Stored size: 590 Bytes
Contents
import Foundation struct Isogram { static func isIsogram(_ string: String) -> Bool { let lowercasedString = string.lowercased() let lowercaseLetterSet = CharacterSet.lowercaseLetters var letters: Set<UnicodeScalar> = [] for character in lowercasedString.unicodeScalars { guard lowercaseLetterSet.contains(character) else { continue } guard !letters.contains(character) else { return false } letters.insert(character) } return true } }
Version data entries
364 entries across 364 versions & 1 rubygems