Add utils::revstr
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
#include <utils/revstr.hpp>
|
||||
|
||||
namespace utils
|
||||
{
|
||||
std::string revstr(const std::string& original)
|
||||
{
|
||||
return {original.rbegin(), original.rend()};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
#ifndef REVSTRP_INCLUDED
|
||||
# define REVSTR_INCLUDED
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace utils
|
||||
{
|
||||
std::string revstr(const std::string& original);
|
||||
}
|
||||
|
||||
#endif // REVSTR_INCLUDED
|
||||
Reference in New Issue
Block a user