Skip to content

Quickly find matches in a Swift collection

License

Notifications You must be signed in to change notification settings

iOS-Swift-Controls/FindFaster

 
 

Repository files navigation

FindFaster

import FindFaster

let text = "Lorem ipsum dolor sit amet"
let search = "or"

for await index in text.fastSearch(for: search) {
    print("Found match at: \(index)")
}

// Prints:
//  Found match at: 1
//  Found match at: 15

Fast asynchronous swift collection search using the Boyer–Moore string-search algorithm. fastSearch can be used with any BidirectionalCollection where Element is Equatable and Hashable, and is especially useful for searching large amounts of data or long strings and displaying the results as they come in.

FindFaster is used for find and replace in HextEdit, a fast and native macOS hex editor.

About

Quickly find matches in a Swift collection

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Swift 100.0%