Skip to content

SwiftDiffPatch is a library for applying patches in Diff format to text

License

Notifications You must be signed in to change notification settings

STCData/SwiftDiffPatch

Repository files navigation

Swift

SwiftDiffPatch

import SwiftDiffPatch

let patch = """
    1c1
    < Hello
    ---
    > Hi
    """
    
let original = """
    Hello
    World
    """

let patched = original.patched(with: patch)

print(patched ?? "Unable to apply patch.")

About

SwiftDiffPatch is a library for applying patches in Diff format to text

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages