1
0
mirror of https://github.com/BurntSushi/ripgrep.git synced 2024-12-07 11:13:17 +02:00
ripgrep/grep-searcher
Andrew Gallant 85417e52e9
searcher: partially migrate to bstr
This commit causes grep-searcher to use byte strings internally for its
line buffer support. We manage to remove a use of `unsafe` by doing this
(by pushing it down into `bstr`).

We stop short of using byte strings everywhere else because we rely
heavily on the `impl ops::Index<[u8]> for grep_matcher::Match` impl,
which isn't available for byte strings. (It is premature to make bstr a
public dep of a core crate like grep-matcher, but maybe some day.)
2019-04-05 20:41:26 -04:00
..
examples libripgrep: initial commit introducing libripgrep 2018-08-20 07:10:19 -04:00
src searcher: partially migrate to bstr 2019-04-05 20:41:26 -04:00
Cargo.toml searcher: partially migrate to bstr 2019-04-05 20:41:26 -04:00
LICENSE-MIT libripgrep: initial commit introducing libripgrep 2018-08-20 07:10:19 -04:00
README.md libripgrep: initial commit introducing libripgrep 2018-08-20 07:10:19 -04:00
UNLICENSE libripgrep: initial commit introducing libripgrep 2018-08-20 07:10:19 -04:00

grep-searcher

A high level library for executing fast line oriented searches. This handles things like reporting contextual lines, counting lines, inverting a search, detecting binary data, automatic UTF-16 transcoding and deciding whether or not to use memory maps.

Linux build status Windows build status

Dual-licensed under MIT or the UNLICENSE.

Documentation

https://docs.rs/grep-searcher

NOTE: You probably don't want to use this crate directly. Instead, you should prefer the facade defined in the grep crate.

Usage

Add this to your Cargo.toml:

[dependencies]
grep-searcher = "0.1"

and this to your crate root:

extern crate grep_searcher;