Advertisement
thieumao

Convert tiếng Việt có dấu thành không dấu

Apr 26th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 0.33 KB | None | 0 0
  1. các bác cho em hỏi làm thế nào convert tiếng việt có dấu thành không dấu ạ swift
  2.  
  3. > var mutableString = NSMutableString(string: str) as CFMutableString
  4. > CFStringTransform(mutableString, nil, kCFStringTransformStripCombiningMarks, false)
  5. > let normalized = (mutableString as NSMutableString).copy() as! NSString
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement