libzed 1.9.9
A general-purpose library for quick and simple data manipulation.
 
Loading...
Searching...
No Matches
charFunctions.hpp
1#pragma once
2
3#include <cstddef>
4#include <cstdint>
5
6namespace z {
7namespace core {
19bool isUpperAlpha(uint32_t ch) noexcept;
20
32bool isLowerAlpha(uint32_t ch) noexcept;
33
41bool isUpper(uint32_t ch) noexcept;
42
50bool isLower(uint32_t ch) noexcept;
51
62uint32_t toUpper(uint32_t ch, bool camel = false) noexcept;
63
74
85
99
112
122
131
140
150
159
168
177
187} // namespace core
188} // namespace z
A wrapper for std::vector.
Definition array.hpp:72
uint32_t toUpper(uint32_t ch, bool camel=false) noexcept
Convert the given character to uppercase.
bool isUpper(uint32_t ch) noexcept
Check if the given character is an uppercase character.
bool isNumeric(uint32_t ch, int base=10) noexcept
Check if the given character is numeric under the given base.
int toUTF8(uint8_t *c, uint32_t chr) noexcept
Convert a character to UTF-8 encoding.
uint32_t fromUTF8(uint8_t *c) noexcept
Convert a character from UTF-8 to UTF32 encoding.
bool isLower(uint32_t ch) noexcept
Check if the given character is a lowercase character.
bool isWhiteSpace(uint32_t ch) noexcept
Check if the given character is white space.
uint32_t toLower(uint32_t ch, bool alternate=false) noexcept
Convert the given character to lowercase.
int numeralValue(uint32_t ch) noexcept
Convert the given character to its respective numeral value.
bool isLowerAlpha(uint32_t ch) noexcept
Check if the given character is a lowercase alphabetic character.
bool isUTF8(uint8_t *c, int len) noexcept
Get whether the characters are in valid UTF-8 format.
bool isAlpha(uint32_t ch) noexcept
Check if the given character is an alphabetic character.
bool isUpperAlpha(uint32_t ch) noexcept
Check if the given character is an uppercase alphabetic character.
int lenFromUTF8(uint8_t *c) noexcept
Get the character length of a UTF-8 sequence.
uint32_t numeral(int value) noexcept
Convert the given value to its respective numeral character.
int lenToUTF8(uint32_t chr) noexcept
Get the length of the UTF-8 encoding for a character.
bool isAlphaNumeric(uint32_t ch) noexcept
Check if the given character is alphanumeric.