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)
Usage examples (Cross-references)
- In
Io.c:1578:
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:2294:
} else {
// Unquoted form: whitespace ends the field.
if (is_string && IS_SPACE(*i)) {
return i;
}- In
Io.c:2524:
char c = 0;
while (StrIterPeek(&si, &c) && IS_SPACE(c)) {
StrIterMustNext(&si);
}- In
Io.c:2542:
StrIter saved = si;
Zstr start = StrIterDataAt(&si, StrIterIndex(&si));
while (StrIterPeek(&si, &c) && !IS_SPACE(c)) {
StrIterMustNext(&si);
}- In
Io.c:2637:
char c = 0;
while (StrIterPeek(&si, &c) && IS_SPACE(c)) {
StrIterMustNext(&si);
}- In
Io.c:2756:
char c = 0; \
\
while (StrIterPeek(&si, &c) && IS_SPACE(c)) { \
StrIterMustNext(&si); \
} \
- In
Io.c:3054:
char c = 0;
while (StrIterPeek(&si, &c) && IS_SPACE(c)) {
StrIterMustNext(&si);
}- In
Io.c:3190:
char c = 0;
while (StrIterPeek(&si, &c) && IS_SPACE(c)) {
StrIterMustNext(&si);
}- In
Io.c:3287:
char c = 0;
while (StrIterPeek(&si, &c) && IS_SPACE(c)) {
StrIterMustNext(&si);
}- In
Io.c:3343:
char c = 0;
while (StrIterPeek(&si, &c) && IS_SPACE(c)) {
StrIterMustNext(&si);
}- In
Io.c:3361:
StrIter saved = si;
Zstr start = StrIterDataAt(&si, StrIterIndex(&si));
while (StrIterPeek(&si, &c) && !IS_SPACE(c)) {
StrIterMustNext(&si);
}- In
Str.c:880:
size pos = 0;
while (pos < str->length && IS_SPACE(str->data[pos]))
pos++;- In
Str.c:914:
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:932:
}
while (pos < str->length && IS_SPACE(str->data[pos]))
pos++;- In
Str.c:961:
size pos = 0;
while (pos < str->length && IS_SPACE(str->data[pos]))
pos++;- In
Str.c:1021:
size pos = 0;
while (pos < str->length && IS_SPACE(str->data[pos]))
pos++;- In
Str.c:1037:
if (c1 == 'n' && c2 == 'a' && c3 == 'n') {
if (str->length - pos == 3 || IS_SPACE(str->data[pos + 3])) {
*value = nan_f64();
return true;- In
Str.c:1043:
}
if (c1 == 'i' && c2 == 'n' && c3 == 'f') {
if (str->length - pos == 3 || IS_SPACE(str->data[pos + 3])) {
*value = inf_f64();
return true;- In
Str.c:1063:
if (c1 == 'i' && c2 == 'n' && c3 == 'f') {
if (str->length - pos == 3 || IS_SPACE(str->data[pos + 3])) {
*value = -inf_f64();
return true;- In
Str.c:1131:
}
while (pos < str->length && IS_SPACE(str->data[pos]))
pos++;- In
Types.h:536:
///
/// TAGS: Character, ASCII, Printable
#define IS_PRINTABLE(c) (IN_RANGE(c, 0x20, 0x7e) || IS_SPACE(c))
///
Last updated on