mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
move reverse_string to string.hpp
This commit is contained in:
@@ -316,14 +316,6 @@ SCRIPT_FUNCTION(to_title) {
|
||||
SCRIPT_RETURN(capitalize(input.Lower()));
|
||||
}
|
||||
|
||||
String reverse_string(String const& input) {
|
||||
// Note: std::reverse doesn't work because of unicode encoding stuff
|
||||
String reversed;
|
||||
for (auto it = input.rbegin(); it != input.rend(); ++it) {
|
||||
reversed += *it;
|
||||
}
|
||||
return reversed;
|
||||
}
|
||||
// reverse a string
|
||||
SCRIPT_FUNCTION(reverse) {
|
||||
SCRIPT_PARAM_C(String, input);
|
||||
|
||||
Reference in New Issue
Block a user