IronGOLEM/tests/replace_index.🗿

10 lines
318 B
Plaintext
Raw Permalink Normal View History

2023-07-25 03:41:07 -04:00
main()
{
name = "replace_index";
test_str(replace_index("yo ca va ?", "t", 2, 3), "yotca va ?", "");
test_str(replace_index("yo ca va ?", "", 2, 3), "yoca va ?", "empty fill");
test_str(replace_index("yo ca va ?", "aaaaa", 2, 3), "yoaaaaaca va ?", "");
test_str(replace_index("", "aaaaa", 0, 0), "aaaaa", "");
}