synterm 0.3.1

A Rust library for making beautiful REPLs and Shells with fish like as you type syntax highlighting
1
2
3
4
5
6
7
8
9
use synterm::calculate_whitespace;

#[test]
pub fn test_cw() {
    assert_eq!(
        calculate_whitespace("\x01\x1b[1;33m\x02>>> \x01\x1b[m\x02"),
        4
    )
}