Crate string_overlap[][src]

Expand description

Overlap text.

For overlapping purposes, whitespace characters in the foreground are treated as “invisible,” and the character from the background will be used instead.

NOTE Final newlines are inserted.

Example

use string_overlap::overlap;

let background = "\
...
...
...";
let foreground = "\
foo
  o
  f";

assert_eq!(overlap(background, foreground), "\
foo
..o
..f\n");

Features

Default

colored

Allows overlapping of ColoredStrings from the colored crate.

Functions

Places foreground “on top of” background.

Overlap ColoredStrings.