Swift APIs for ICU

What's New

0.2.0: Add break cursors (ICU break iterators).


This release adds new types to represent ICU's various break iterators (which we call "cursors"). There is a concrete type for each kind of cursor (Character, Line, RuleBased, Sentence, and Word), which use strongly typed rule status values instead of plain integers.

ICU for Swift

Build Status

This package implements Swift-style APIs for ICU (International Components for Unicode) for Swift 4.

Swift already provides great support for working with strings, characters, code points, and code units of various encodings in a Unicode-safe way. This library fills in some of the more detailed functionality not in the standard library.

Usage note

If you are using this library (or ICU in general) in an application meant for distribution on the App Store, Apple considers the ICU dynamic library included with the operating system to be private API and will reject the submission.

This can be worked around; the solution is to statically link ICU in your application instead of relying on the system version.


  • 0.2.0 (2017.11.23): Adds CharacterBreakCursor, LineBreakCursor, RuleBasedBreakCursor, SentenceBreakCursor, and WordBreakCursor, which wrap ICU's break iterators.

  • 0.1.3 (2017.10.30): Fixes the missing usearch.h dependency by updating to the correct version of icu4c, which wasn't caught when working in Xcode.

  • 0.1.2 (2017.10.07): Fix text and pattern setters in SearchCursor.

  • 0.1.1 (2017.10.07): Add SearchCursor, which wraps ICU's search iterator.

  • 0.1.0 (2017.06.23): Initial release. Adds a number of custom types to the Unicode namespace and corresponding properties and methods to UnicodeScalar.

Future work

  • Wrap more ICU core features
  • Easier integration with iOS, tvOS, watchOS (not using Swift Package Manager)


  • Swift Tools 4.0.0
View More Packages from this Author


Last updated: Sun Jan 29 2023 05:28:44 GMT-0500 (GMT-05:00)