TDME2 1.9.121
Character.h
Go to the documentation of this file.
1#pragma once
2
3#include <cctype>
4#include <cwctype>
5
6#include <tdme/tdme.h>
8
9/**
10 * Character class
11 * @author Andreas Drewke
12 * @version $Id$
13 */
15{
16public:
17
18 /**
19 * Convert character to lower case character
20 * @param character character
21 * @return lower case character
22 */
23 inline static char toLowerCase(char character) {
24 return tolower(character);
25 }
26
27 /**
28 * Convert character to upper case character
29 * @param character character
30 * @return upper case character
31 */
32 inline static char toUpperCase(char character) {
33 return toupper(character);
34 }
35
36 /**
37 * Returns if character is alpha numeric
38 * @return if character is alpha numeric
39 */
40 inline static bool isAlphaNumeric(char character) {
41 return isalnum(character) != 0;
42 }
43
44 /**
45 * Returns if character is a white space
46 * @return if character is a white space
47 */
48 inline static bool isSpace(char character) {
49 return isspace(character) != 0;
50 }
51
52};
Character class.
Definition: Character.h:15
static bool isAlphaNumeric(char character)
Returns if character is alpha numeric.
Definition: Character.h:40
static char toLowerCase(char character)
Convert character to lower case character.
Definition: Character.h:23
static char toUpperCase(char character)
Convert character to upper case character.
Definition: Character.h:32
static bool isSpace(char character)
Returns if character is a white space.
Definition: Character.h:48