[ox/std] Add String::endsWith

This commit is contained in:
2021-04-17 16:35:14 -05:00
parent 49fb4d0f0b
commit 8f7504c1c8
3 changed files with 32 additions and 0 deletions

View File

@@ -75,6 +75,10 @@ std::map<std::string, std::function<ox::Error()>> tests = {
oxAssert(s == "asdf", "String assign broken");
s += "aoeu";
oxAssert(s == "asdfaoeu", "String append broken");
ox::String ending = "asdf";
oxAssert(ending.endsWith("df"), "String::endsWith is broken");
oxAssert(!ending.endsWith("awefawe"), "String::endsWith is broken");
oxAssert(!ending.endsWith("eu"), "String::endsWith is broken");
return OxError(0);
}
},