xieite::ch {}

Defined in fragment xieite:ch
(header-only: <xieite/str/ch.hpp>)


A namespace providing collections of characters.


Contents

#0
constexpr std::size_t alphabet_size = 26;
Provides the size of the English alphabet.

#1
constexpr std::string_view upper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
The English alphabet in uppercase. Its size is guaranteed to be xieite::ch::alphabet_size.

#2
constexpr std::string_view lower = "abcdefghijklmnopqrstuvwxyz";
The English alphabet in lowercase. Its size is guaranteed to be xieite::ch::alphabet_size.

#3
constexpr std::string_view digits = "0123456789";
Digits 0 through 9 in ascending order.

#4
constexpr std::string_view whitesp = " \t\n\v\f\r";
Whitespace characters.

#5
constexpr std::string_view alphanum = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
All alphanumeric characters. Consists of digits, followed by the uppercase English alphabet, followed by the lowercase English alphabet.

#6
constexpr std::string_view vowels = "AEIOUaeiou";
Uppercase and lowercase vowels in the English alphabet. Does not include semivowels.

#7
constexpr std::string_view consonants = "BCDFGHJKLMNPQRSTVWXYZbcdfghjklmnpqrstvwxyz";
Uppercase and lowercase consonants in the English alphabet. Includes semivowels (W, Y, w, y).


Example

import std;
import xieite;

int main() {
	xieite::unroll<16uz>([]<std::size_t... i> {
		xieite::dump(xieite::ch::alphanum[i]...);
	});
}
Output:
0 1 2 3 4 5 6 7 8 9 A B C D E F
View in Compiler Explorer