Skip to content

Instantly share code, notes, and snippets.

@iltercengiz
Last active August 29, 2015 14:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save iltercengiz/ca13490eeb2b9459b92d to your computer and use it in GitHub Desktop.
Save iltercengiz/ca13490eeb2b9459b92d to your computer and use it in GitHub Desktop.
Get rid of accented characters
NSString *string = [@"Fıstıkçı Şahap" stringByFoldingWithOptions:NSDiacriticInsensitiveSearch
locale:[NSLocale localeWithLocaleIdentifier:@"en"]];
import Foundation
var mutableString = NSMutableString(string: "Fıstıkçı Şahap") as CFMutableStringRef
CFStringTransform(mutableString, nil, "Any-Latin; Latin-ASCII", Boolean(0))
mutableString
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment