Skip to content

IS_PRINTABLE

IS_PRINTABLE

Description

Checks whether a given character ‘c’ is printable ascii or not.

Only characters in range 0x20 to 0x7e and whitespace characters are considered printable.

Parameters

Name Direction Description
c in Character to check.

Success

Returns true or false based on whether given character is printable or not

Failure

Cannot fail, always return boolean result

Usage example (Cross-references)

Usage examples (Cross-references)
            u8 byte = (value >> ((num_bytes - 1 - i) * 8)) & 0xFF;
    
            if (IS_PRINTABLE(byte)) {
                // For 'a'/'A' format specifier (force_case), apply case conversion
                // For 'c' format specifier, preserve the original case
    
        while (len--) {
            if (IS_PRINTABLE(*vs)) {
                // For 'a'/'A' format specifier (force_case), apply case conversion
                // For 'c' format specifier, preserve the original case
                } else {
                    StrForeachInRange(s, c, 0, len) {
                        if (IS_PRINTABLE(c)) {
                            StrPushBack(o, c);
                        } else {
                } else {
                    for (size i = 0; i < len; i++) {
                        if (IS_PRINTABLE(xs[i])) {
                            StrPushBack(o, xs[i]);
                        } else {
Last updated on