Skip to content

NSString category to identify and remove surrogate pair UTF-8 characters

License

Notifications You must be signed in to change notification settings

yodle/NSString-SurrogatePair

Repository files navigation

NSString-SurrogatePair

CocoaPods

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.

Usage

BOOL containsSurrogatePair = [@"" containsSurrogatePair];
NSString* stringByRemovingSurrogatePairs = [@"" stringByRemovingSurrogatePairs];

Install

Use CocoaPods.

pod 'NSString-SurrogatePair'

Tests

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.

Credits

This is loosely based on another pod: NSString-RemoveEmoji

License

Copyright (c) 2016 Yodle Licensed under the Apache 2 License.

About

NSString category to identify and remove surrogate pair UTF-8 characters

Resources

License

Stars

Watchers

Forks

Packages

No packages published