Registry / utility / colored-diff

colored-diff

JSON →
library0.2.3rscratesunverified

Formats the difference between two strings with ANSI colors for terminal output.

# Cargo.toml [dependencies] colored-diff = "0.2.3"
INSTALL
IMPORT
SIG · COLORED-DIFF
C
colored-diff
utilityrustv0.2.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

diff
use colored_diff::diff;

Compares two strings and prints a colored diff.

use colored_diff::diff; fn main() { let old = "hello\nworld"; let new = "hello\nrust"; println!("{}", diff(old, new)); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.2.3latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
14 hits · last 30 days
node
14
Resources
colored-diff — cargo add colored-diff · libregistry