mirror of
https://github.com/verilator/verilator.git
synced 2025-04-05 20:22:41 +00:00
Internals: Make upcase clean. No functional change.
This commit is contained in:
parent
0658af90f5
commit
dc037db1cd
@ -79,13 +79,13 @@ string VString::dot(const string& a, const string& dot, const string& b) {
|
||||
return a + dot + b;
|
||||
}
|
||||
|
||||
string VString::downcase(const string& str) {
|
||||
string VString::downcase(const string& str) VL_PURE {
|
||||
string result = str;
|
||||
for (char& cr : result) cr = std::tolower(cr);
|
||||
return result;
|
||||
}
|
||||
|
||||
string VString::upcase(const string& str) {
|
||||
string VString::upcase(const string& str) VL_PURE {
|
||||
string result = str;
|
||||
for (char& cr : result) cr = std::toupper(cr);
|
||||
return result;
|
||||
|
@ -90,9 +90,9 @@ public:
|
||||
// Return {a}{dot}{b}, omitting dot if a or b are empty
|
||||
static string dot(const string& a, const string& dot, const string& b);
|
||||
// Convert string to lowercase (tolower)
|
||||
static string downcase(const string& str);
|
||||
static string downcase(const string& str) VL_PURE;
|
||||
// Convert string to upper case (toupper)
|
||||
static string upcase(const string& str);
|
||||
static string upcase(const string& str) VL_PURE;
|
||||
// Insert esc just before tgt
|
||||
static string quoteAny(const string& str, char tgt, char esc);
|
||||
// Replace any \'s with \\ (two consecutive backslashes)
|
||||
|
Loading…
Reference in New Issue
Block a user