diff --git a/include/dpp/snowflake.h b/include/dpp/snowflake.h index 47e333dd1b..8f7cbad7b3 100644 --- a/include/dpp/snowflake.h +++ b/include/dpp/snowflake.h @@ -92,6 +92,16 @@ class DPP_EXPORT snowflake final { return value == 0; } + /** + * @brief Returns the stringified version of the snowflake value + * + * @return std::string string form of snowflake value + */ + inline std::string str() const + { + return std::to_string(value); + } + /** * @brief Operator less than, used for maps/unordered maps * when the snowflake is a key value.