IS_SPACE
- Macro
- August 22, 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
Types.h:262
:
///
/// TAGS: Character, ASCII, Printable
#define IS_PRINTABLE(c) (IN_RANGE(c, 0x20, 0x7e) || IS_SPACE(c))
///
- In
Io.c:734
:
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:1262
:
// Skip leading whitespace
while (IS_SPACE(*i))
i++;
- In
Io.c:1310
:
} else {
// Unquoted string mode - read until whitespace
if (IS_SPACE(*i)) {
return i; // Successfully read unquoted string
}
- In
Io.c:1526
:
// Skip whitespace
while (IS_SPACE(*i))
i++;
- In
Io.c:1539
:
// For special values, use the original approach
const char* start = i;
while (*i && !IS_SPACE(*i))
i++;
- In
Io.c:1626
:
// Skip whitespace
while (IS_SPACE(*i))
i++;
- In
Io.c:1707
:
// Skip whitespace
while (IS_SPACE(*i))
i++;
- In
Io.c:1782
:
// Skip whitespace
while (IS_SPACE(*i))
i++;
- In
Io.c:1856
:
// Skip whitespace
while (IS_SPACE(*i))
i++;
- In
Io.c:1921
:
// Skip whitespace
while (IS_SPACE(*i))
i++;
- In
Io.c:1996
:
// Skip whitespace
while (IS_SPACE(*i))
i++;
- In
Io.c:2071
:
// Skip whitespace
while (IS_SPACE(*i))
i++;
- In
Io.c:2146
:
// Skip whitespace
while (IS_SPACE(*i))
i++;
- In
Io.c:2297
:
// Skip leading whitespace
while (IS_SPACE(*i))
i++;
- In
Io.c:2423
:
// Skip whitespace
while (IS_SPACE(*i))
i++;
- In
Io.c:2436
:
// For special values, use the original approach
const char* start = i;
while (*i && !IS_SPACE(*i))
i++;
- In
Str.c:587
:
// Skip whitespace
size_t pos = 0;
while (pos < str->length && IS_SPACE(str->data[pos]))
pos++;
- In
Str.c:622
:
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:640
:
// Skip trailing whitespace
while (pos < str->length && IS_SPACE(str->data[pos]))
pos++;
- In
Str.c:671
:
// Skip whitespace
size_t pos = 0;
while (pos < str->length && IS_SPACE(str->data[pos]))
pos++;
- In
Str.c:735
:
// Skip whitespace
size_t pos = 0;
while (pos < str->length && IS_SPACE(str->data[pos]))
pos++;
- In
Str.c:750
:
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:756
:
}
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:776
:
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:844
:
// Skip trailing whitespace
while (pos < str->length && IS_SPACE(str->data[pos]))
pos++;