Refactored class diagram generator to use identifiers for types

This commit is contained in:
Bartek Kryza
2021-03-07 23:04:43 +01:00
parent 77f24b5360
commit e07392dae6
14 changed files with 252 additions and 115 deletions

View File

@@ -19,6 +19,23 @@
namespace clanguml {
namespace util {
const std::string WHITESPACE = " \n\r\t\f\v";
std::string ltrim(const std::string &s)
{
size_t start = s.find_first_not_of(WHITESPACE);
return (start == std::string::npos) ? "" : s.substr(start);
}
std::string rtrim(const std::string &s)
{
size_t end = s.find_last_not_of(WHITESPACE);
return (end == std::string::npos) ? "" : s.substr(0, end + 1);
}
std::string trim(const std::string &s) { return rtrim(ltrim(s)); }
std::vector<std::string> split(std::string str, std::string delimiter)
{
std::vector<std::string> result;