tittom.bsky.social
@tittom.bsky.social
iOS developer
Reposted
Tell a friend to save a life:

❌ name.lowercased().contains(searchText.lowercased())
✅ name.localizedStandardContains(searchText)

The latter ignores case, but also ignores diacritics (cafe vs café), handles localized variants (ẞ → ss, etc), and is supported in SwiftData.
March 13, 2025 at 1:35 PM