refactor: Add str() method to BaseTagDecorator (#2020)

Fix: https://github.com/XRPLF/clio/issues/2008
This commit is contained in:
Ayaz Salikhov
2025-04-24 16:48:19 +01:00
committed by GitHub
parent 3916635037
commit ade6289de2
2 changed files with 14 additions and 7 deletions

View File

@@ -96,6 +96,19 @@ public:
decorator.decorate(os);
return os;
}
/**
* @brief Gets the string representation of the tag.
*
* @return The string representation of the tag
*/
std::string
toString() const
{
std::ostringstream oss;
decorate(oss);
return std::move(oss).str();
}
};
/**