An NSString
category to identify and remove surrogate pair UTF-8 characters.
This is to support the unicode character set in MySQL which handles a maximum of three bytes per multibyte character.
BOOL containsSurrogatePair = [@"✨" containsSurrogatePair];
NSString* stringByRemovingSurrogatePairs = [@"✨" stringByRemovingSurrogatePairs];
Use CocoaPods.
pod 'NSString-SurrogatePair'
This project is unit tested and ready for production. To run the tests, open the sample project and run the tests against the sample application target.
This is loosely based on another pod: NSString-RemoveEmoji
Copyright (c) 2016 Yodle Licensed under the Apache 2 License.