Macro libyml::IS_PRINTABLE
source · macro_rules! IS_PRINTABLE { ($string:expr) => { ... }; }
Expand description
Checks if the character at the current pointer in the given string is printable.
§Parameters
string
: A reference to a struct containing a pointer to the current character in the string.
§Return
bool
: Returnstrue
if the character is printable, andfalse
otherwise.
§Details
This macro checks if the character at the current pointer in the given string is printable. It considers various Unicode ranges and special characters to determine printability.
The macro uses pattern matching to check the byte value of the character and its position in the string. It checks for ASCII printable characters, Unicode printable characters in specific ranges, and special characters that are considered printable.
The macro returns true
if the character is printable, and false
otherwise.