mirror of
https://github.com/WerWolv/ImHex-Patterns.git
synced 2026-03-28 07:47:02 -05:00
includes/std: Added string reverse function
This commit is contained in:
@@ -27,4 +27,18 @@ namespace std::string {
|
||||
return false;
|
||||
};
|
||||
|
||||
fn reverse(str string) {
|
||||
str result;
|
||||
|
||||
s32 i;
|
||||
i = std::string::length(string);
|
||||
while (i > 0) {
|
||||
i = i - 1;
|
||||
result = result + std::string::at(string, i);
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user