aboutsummaryrefslogtreecommitdiff
path: root/misc.c
blob: feb5e73b518dfba26c903ce3f52b6cfea6a2087e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "misc.h"

#include <wctype.h>

bool
isword(wchar_t wc, bool spaces_only, const wchar_t *delimiters)
{
    if (spaces_only)
        return iswgraph(wc);

    if (wcschr(delimiters, wc) != NULL)
        return false;

    return iswgraph(wc);
}