mirror of
https://github.com/nicklockwood/SwiftFormat.git
synced 2026-05-17 10:30:35 +00:00
78836b9959
Add preferSwiftStringAPI rule (#2292) Replaces the Objective-C bridged `replacingOccurrences(of:with:)` with Swift-native `replacing(_:with:)`. The ObjC method has known Unicode bugs (e.g. corrupting emoji flag sequences); the Swift equivalent is safer, shorter, and available from Swift 5.7+. Only the two-argument form is transformed — calls with `options:` or `range:` are left unchanged as they have no direct Swift equivalent.