|
Cppcheck
|
#include "utils.h"#include <algorithm>#include <cctype>#include <iterator>#include <stack>#include <utility>Go to the source code of this file.
Functions | |
| int | caseInsensitiveStringCompare (const std::string &lhs, const std::string &rhs) |
| bool | isValidGlobPattern (const std::string &pattern) |
| bool | matchglob (const std::string &pattern, const std::string &name) |
| bool | matchglobs (const std::vector< std::string > &patterns, const std::string &name) |
| void | strTolower (std::string &str) |
| std::string | trim (const std::string &s, const std::string &t) |
| Remove heading and trailing whitespaces from the input parameter. More... | |
| void | findAndReplace (std::string &source, const std::string &searchFor, const std::string &replaceWith) |
| Replace all occurrences of searchFor with replaceWith in the given source. More... | |
| int caseInsensitiveStringCompare | ( | const std::string & | lhs, |
| const std::string & | rhs | ||
| ) |
Definition at line 28 of file utils.cpp.
Referenced by cppcheck::stricmp::operator()(), and Path::sameFileName().
| void findAndReplace | ( | std::string & | source, |
| const std::string & | searchFor, | ||
| const std::string & | replaceWith | ||
| ) |
Replace all occurrences of searchFor with replaceWith in the given source.
| source | The string to modify |
| searchFor | What should be searched for |
| replaceWith | What will replace the found item |
Definition at line 142 of file utils.cpp.
Referenced by ErrorMessage::toString().
| bool isValidGlobPattern | ( | const std::string & | pattern | ) |
Definition at line 41 of file utils.cpp.
Referenced by SuppressionList::addSuppression(), and ImportProject::ignorePaths().
| bool matchglob | ( | const std::string & | pattern, |
| const std::string & | name | ||
| ) |
Definition at line 54 of file utils.cpp.
Referenced by ImportProject::ignorePaths(), SuppressionList::Suppression::isSuppressed(), and matchglobs().
| bool matchglobs | ( | const std::vector< std::string > & | patterns, |
| const std::string & | name | ||
| ) |
Definition at line 118 of file utils.cpp.
References matchglob().
Referenced by ImportProject::importVcxproj().
| void strTolower | ( | std::string & | str | ) |
Definition at line 124 of file utils.cpp.
Referenced by CheckOther::checkKnownArgument(), Path::getFilenameExtension(), Path::identify(), PathMatch::match(), PathMatch::PathMatch(), and Standards::setCPP().