aboutsummaryrefslogtreecommitdiff
path: root/vendor/librune/lib/rtype/risspace.c
blob: 9d9836398532ea191b36de876dad7448f1551d77 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include "rtype.h"

#include "internal/common.h"

static constexpr bool latin1_space_tbl[LATIN1_MAX + 1] = {
	['\t'] = true, ['\n'] = true, ['\v'] = true, ['\f'] = true,
	['\r'] = true, [' '] = true,  [0x85] = true, [0xA0] = true,
};

bool
risspace(rune ch)
{
	if (ch <= LATIN1_MAX)
		return latin1_space_tbl[ch];
	return rprop_get_gc(ch) & GC_Z;
}