#utf-8 #printable #ascii #char

is_printable

Determine whether a given text-based value is printable

11 releases

0.0.11 Aug 11, 2024
0.0.10 Aug 11, 2024

#1532 in Text processing

Download history 51/week @ 2024-08-26 11/week @ 2024-09-02 32/week @ 2024-09-09 47/week @ 2024-09-16 138/week @ 2024-09-23 24/week @ 2024-09-30 51/week @ 2024-10-07 2/week @ 2024-10-14 1/week @ 2024-10-28 19/week @ 2024-11-04 7/week @ 2024-11-11 19/week @ 2024-11-18 10/week @ 2024-11-25 138/week @ 2024-12-09

167 downloads per month

MIT/Apache

7KB
84 lines

Determines whether a given text-based value is printable.

Printable example:

    let hello = "hello";
    let is_printable = hello.is_printable();
    assert_eq!(is_printable, true);

Unprintable example:

    let bell = '\u{7}'
    let is_printable = bell.is_printable();
    assert_eq!(is_printable, false);

Dependencies

~0.1–6MB
~34K SLoC