Skip to content

Commit

Permalink
chore(webserv.hpp): Add itoa utility macro to convert integers to str…
Browse files Browse the repository at this point in the history
…ings
  • Loading branch information
samih713 committed Feb 25, 2024
1 parent 005dc86 commit 1ad38a5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion includes/webserv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
#define WEBSERV_HPP

/* --------------------------------- MACROS --------------------------------- */
#define to_str(name) #name
#define ws_tostr(name) #name
#define ws_itoa(number) \
static_cast<std::ostringstream &>((std::ostringstream() << std::dec << number)).str()

/* -------------------------------- INCLUDES -------------------------------- */
#include "debug.hpp"
Expand Down

0 comments on commit 1ad38a5

Please sign in to comment.