Skip to content

Commit 7ea92f4

Browse files
Add reverse_string utility function in cliutils namespace
1 parent e33d092 commit 7ea92f4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

include/cliutils/custom_util.hpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#pragma once
2+
#include <string>
3+
4+
namespace cliutils {
5+
6+
// Returns the reverse of a given string
7+
inline std::string reverse_string(const std::string &input) {
8+
return std::string(input.rbegin(), input.rend());
9+
}
10+
11+
}

0 commit comments

Comments
 (0)