IS_SPACE
- Macro
- October 8, 2025
Table of Contents
IS_SPACE
IS_SPACE
Description
Checks if the given character c
is a whitespace character.
Parameters
Name | Direction | Description |
---|---|---|
c | in | The character to check. |
Success
Returns true for space, tab, newline, carriage return, vertical tab, form feed.
Failure
Function cannot fail - always returns boolean result.
Usage example (Cross-references)
- In
Io.c:794
:
bool is_caps = fmt_info && (fmt_info->flags & FMT_FLAG_CAPS) != 0;
while (bytes_read < buffer_size && *current && !IS_SPACE(*current)) {
u8 char_to_store;
- In
Io.c:1372
:
} else {
// Unquoted string mode - read until whitespace
if (is_string && IS_SPACE(*i)) {
return i; // Successfully read unquoted string
}
- In
Io.c:1590
:
// Skip whitespace
while (IS_SPACE(*i))
i++;
- In
Io.c:1603
:
// For special values, use the original approach
const char *start = i;
while (*i && !IS_SPACE(*i))
i++;
- In
Io.c:1690
:
// Skip whitespace
while (IS_SPACE(*i))
i++;
- In
Io.c:1771
:
// Skip whitespace
while (IS_SPACE(*i))
i++;
- In
Io.c:1846
:
// Skip whitespace
while (IS_SPACE(*i))
i++;
- In
Io.c:1920
:
// Skip whitespace
while (IS_SPACE(*i))
i++;
- In
Io.c:1985
:
// Skip whitespace
while (IS_SPACE(*i))
i++;
- In
Io.c:2060
:
// Skip whitespace
while (IS_SPACE(*i))
i++;
- In
Io.c:2135
:
// Skip whitespace
while (IS_SPACE(*i))
i++;
- In
Io.c:2210
:
// Skip whitespace
while (IS_SPACE(*i))
i++;
- In
Io.c:2361
:
// Skip leading whitespace
while (IS_SPACE(*i))
i++;
- In
Io.c:2487
:
// Skip whitespace
while (IS_SPACE(*i))
i++;
- In
Io.c:2500
:
// For special values, use the original approach
const char *start = i;
while (*i && !IS_SPACE(*i))
i++;
- In
Str.c:588
:
// Skip whitespace
size_t pos = 0;
while (pos < str->length && IS_SPACE(str->data[pos]))
pos++;
- In
Str.c:623
:
u8 digit;
if (!char_to_digit(str->data[pos], &digit, base)) {
if (IS_SPACE(str->data[pos]))
break;
LOG_ERROR("Invalid digit for base {}: {c}", base, str->data[pos]);
- In
Str.c:641
:
// Skip trailing whitespace
while (pos < str->length && IS_SPACE(str->data[pos]))
pos++;
- In
Str.c:672
:
// Skip whitespace
size_t pos = 0;
while (pos < str->length && IS_SPACE(str->data[pos]))
pos++;
- In
Str.c:732
:
// Skip whitespace
size_t pos = 0;
while (pos < str->length && IS_SPACE(str->data[pos]))
pos++;
- In
Str.c:747
:
if (c1 == 'n' && c2 == 'a' && c3 == 'n') {
if (str->length - pos == 3 || IS_SPACE(str->data[pos + 3])) {
*value = NAN;
return true;
- In
Str.c:753
:
}
if (c1 == 'i' && c2 == 'n' && c3 == 'f') {
if (str->length - pos == 3 || IS_SPACE(str->data[pos + 3])) {
*value = INFINITY;
return true;
- In
Str.c:773
:
if (c1 == 'i' && c2 == 'n' && c3 == 'f') {
if (str->length - pos == 3 || IS_SPACE(str->data[pos + 3])) {
*value = -INFINITY;
return true;
- In
Str.c:841
:
// Skip trailing whitespace
while (pos < str->length && IS_SPACE(str->data[pos]))
pos++;
- In
Types.h:267
:
///
/// TAGS: Character, ASCII, Printable
#define IS_PRINTABLE(c) (IN_RANGE(c, 0x20, 0x7e) || IS_SPACE(c))
///