mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Deduplicate code and use stdlib in string functions
This commit is contained in:
parent
d91559b8f0
commit
3c3887bb19
4 changed files with 168 additions and 218 deletions
|
@ -189,7 +189,7 @@ struct TestUtilities: public TestBase
|
|||
str_replace(test_str, "there", "world");
|
||||
UASSERT(test_str == "Hello world");
|
||||
test_str = "ThisAisAaAtest";
|
||||
str_replace_char(test_str, 'A', ' ');
|
||||
str_replace(test_str, 'A', ' ');
|
||||
UASSERT(test_str == "This is a test");
|
||||
UASSERT(string_allowed("hello", "abcdefghijklmno") == true);
|
||||
UASSERT(string_allowed("123", "abcdefghijklmno") == false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue