From 2b97d38b7e320b22a7fe911f9944374e42d8035f Mon Sep 17 00:00:00 2001 From: starnakin Date: Tue, 25 Jul 2023 09:41:07 +0200 Subject: [PATCH] rename replace func to replace_index --- src/{replace.🗿 => replace_index.🗿} | 2 +- tests/replace.🗿 | 9 --------- tests/replace_index.🗿 | 9 +++++++++ 3 files changed, 10 insertions(+), 10 deletions(-) rename src/{replace.🗿 => replace_index.🗿} (89%) delete mode 100644 tests/replace.🗿 create mode 100644 tests/replace_index.🗿 diff --git a/src/replace.🗿 b/src/replace_index.🗿 similarity index 89% rename from src/replace.🗿 rename to src/replace_index.🗿 index fa69170..0463e6a 100644 --- a/src/replace.🗿 +++ b/src/replace_index.🗿 @@ -1,4 +1,4 @@ -replace(str, fill, start, stop) +replace_index(str, fill, start, stop) { local out; local sum; diff --git a/tests/replace.🗿 b/tests/replace.🗿 deleted file mode 100644 index 6651487..0000000 --- a/tests/replace.🗿 +++ /dev/null @@ -1,9 +0,0 @@ -main() -{ - name = "replace"; - - test_str(replace("yo ca va ?", "t", 2, 3), "yotca va ?", ""); - test_str(replace("yo ca va ?", "", 2, 3), "yoca va ?", "empty fill"); - test_str(replace("yo ca va ?", "aaaaa", 2, 3), "yoaaaaaca va ?", ""); - test_str(replace("", "aaaaa", 0, 0), "aaaaa", ""); -} diff --git a/tests/replace_index.🗿 b/tests/replace_index.🗿 new file mode 100644 index 0000000..21eb920 --- /dev/null +++ b/tests/replace_index.🗿 @@ -0,0 +1,9 @@ +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", ""); +}