#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

#1569 in Text processing

Download history 24/week @ 2024-08-14 8/week @ 2024-08-21 44/week @ 2024-08-28 20/week @ 2024-09-04 48/week @ 2024-09-11 74/week @ 2024-09-18 100/week @ 2024-09-25 21/week @ 2024-10-02 40/week @ 2024-10-09 1/week @ 2024-10-16 9/week @ 2024-10-30 14/week @ 2024-11-06 13/week @ 2024-11-13 15/week @ 2024-11-20 5/week @ 2024-11-27

52 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–9.5MB
~43K SLoC