40 #ifndef _StringUtils_H__ 41 #define _StringUtils_H__ void uppercase(std::string *str)
Replaces each char between a and z with its uppercase equivalent.
Definition: StringUtils.cc:350
std::string BLANKSTRING
A blank string (""). Used to return a blank string by reference.
Definition: StringUtils.cc:46
#define _UtilExport
Definition: UtilPrereqs.h:60
bool hasStringBetweenQuotes(const std::string &str)
Returns true if the string contains something like '..."between quotaton marks"...'.
Definition: StringUtils.cc:142
size_t getNextQuote(const std::string &str, size_t start)
Returns the position of the next quotation mark in the string, starting with start.
Definition: StringUtils.cc:98
std::string addSlashes(const std::string &str)
Adds backslashes to the given string which makes special chars visible.
Definition: StringUtils.cc:260
std::string getTimestamp(void)
Get a timestamp for the current time instant.
Definition: StringUtils.cc:503
bool hasComment(const std::string &str)
Returns true if the string contains a comment, introduced by #, %, ; or //.
Definition: StringUtils.cc:413
::std::string string
Definition: gtest-port.h:756
std::string getUniqueNumberString()
Returns a string of a unique number. This function is guaranteed to never return the same string twic...
Definition: StringUtils.cc:49
std::string removeSlashes(const std::string &str)
Removes backslashes from the given string.
Definition: StringUtils.cc:297
int nocaseCmp(const std::string &s1, const std::string &s2)
Compares two strings ignoring different casing.
Definition: StringUtils.cc:367
bool isComment(const std::string &str)
Determines if a string is a comment (starts with a comment-symbol).
Definition: StringUtils.cc:219
void strip(std::string *str)
Removes all whitespaces from a string.
Definition: StringUtils.cc:55
std::string removeTrailingWhitespaces(const std::string &str)
Returns a copy of a string without trailing whitespaces.
Definition: StringUtils.cc:69
bool isBetweenQuotes(const std::string &str, size_t pos)
Returns true if pos is between two quotation marks.
Definition: StringUtils.cc:123
std::string getLowercase(const std::string &str)
Returns a copy of the given string where all chars are converted to lowercase.
Definition: StringUtils.cc:342
size_t getNextCommentPosition(const std::string &str, size_t start)
Returns the beginning of the next comment including whitespaces in front of the comment symbol...
Definition: StringUtils.cc:433
size_t replaceCharacters(std::string &str, char target, char replacement)
Replaces individual charaters.
Definition: StringUtils.cc:449
std::string stripEnclosingQuotes(const std::string &str)
Removes enclosing quotation marks if available (including whitespaces at the outside of the quotation...
Definition: StringUtils.cc:164
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
Shared library macros, enums, constants and forward declarations for the util library ...
bool isEmpty(const std::string &str)
Determines if a string is empty (contains only whitespaces).
Definition: StringUtils.cc:244
void lowercase(std::string *str)
Replaces each char between A and Z with its lowercase equivalent.
Definition: StringUtils.cc:336
std::string getComment(const std::string &str)
If the string contains a comment, the comment gets returned (including the comment symbol and white s...
Definition: StringUtils.cc:419
std::string getStringBetweenQuotes(const std::string &str)
If the string contains something like '..."between quotaton marks"...' then 'between quotaton marks' ...
Definition: StringUtils.cc:150
std::string stripEnclosingBraces(const std::string &str)
Removes enclosing braces '{' and '}' (the braces must be exactly on the beginning and the end of the ...
Definition: StringUtils.cc:195
std::string getUppercase(const std::string &str)
Returns a copy of the given string where all chars are converted to uppercase.
Definition: StringUtils.cc:356
unsigned int getLevenshteinDistance(const std::string &str1, const std::string &str2)
Calculates the Levenshtein distance between two strings.
Definition: StringUtils.cc:469
std::string getStripped(const std::string &str)
Returns a copy of a string without whitespaces.
Definition: StringUtils.cc:61
void vectorize(const std::string &str, char delimiter, std::vector< std::string > *output)
Splits a given string by a delimiter and stores it in an output vector. See SubString for a more soph...
Definition: StringUtils.cc:82