includes/std: Added string reverse function

This commit is contained in:
WerWolv
2021-10-04 20:42:02 +02:00
parent 3160e592b5
commit 348d16d99b

View File

@@ -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;
};
}