Project

General

Profile

SO3Engine
ALStringCleaner.h
Go to the documentation of this file.
1
7#ifndef ALSTRING_CLEANER_H
8#define ALSTRING_CLEANER_H
9
10
11#include <string>
12#include <vector>
13#include <map>
14
20{
21public:
22
29 static std::string cleanSpaces(std::string str, bool replace=true, char replaceBy='_');
30
37 static std::string cleanASCII(std::string str, bool replace=true, char replaceBy='_');
38
43 static void toLowerCase(std::string str);
44
48 static std::string getUID();
49
53 static std::string curentUID();
54
58 static void resetUID();
59
68 static std::string cleanString(std::string str, bool toLower=true, bool clASCII=true, bool clSpaces=true, bool bUID=true);
69
70private:
75
80 static bool invalidASCIIChar(char c);
81
82 static bool invalidCharE(char c);
83
84 static bool invalidCharA(char c);
85
90 static bool isSpace(char toTest);
91
95 static unsigned int getFirstID();
96
97 static unsigned int uids;
98};
99
100#endif
static std::string curentUID()
return the current UID WITHOUT incrementing the UID.
static void resetUID()
reset the uid to 0.
static std::string cleanASCII(std::string str, bool replace=true, char replaceBy='_')
Clean a string of non-ASCII chars, can delete or replace them.
static void toLowerCase(std::string str)
Convert a string to lower case.
static std::string getUID()
return a unique ID.
static std::string cleanSpaces(std::string str, bool replace=true, char replaceBy='_')
Clean a string of spaces, can delete or replace them.
static std::string cleanString(std::string str, bool toLower=true, bool clASCII=true, bool clSpaces=true, bool bUID=true)
Clean a string.
STBI_EXTERN unsigned long const char * str
Definition stb_image.h:1182