From 71f9535509a19ddfb2432a85e7c7361260890f8e Mon Sep 17 00:00:00 2001 From: sogaiu <33044872+sogaiu@users.noreply.github.com> Date: Sat, 12 Sep 2026 23:39:54 +0000 Subject: [PATCH] Modify string/find* docstrings (#1863) Co-authored-by: sogaiu <983021772@users.noreply.github.com> --- src/core/string.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/core/string.c b/src/core/string.c index afe6236d..c480deb6 100644 --- a/src/core/string.c +++ b/src/core/string.c @@ -308,10 +308,11 @@ static void findsetup(int32_t argc, Janet *argv, struct kmp_state *s, int32_t ex } JANET_CORE_FN(cfun_string_find, - "(string/find patt str &opt start-index)", + "(string/find patt str &opt start)", "Searches for the first instance of pattern `patt` in string " - "`str`. Returns the index of the first character in `patt` if found, " - "otherwise returns nil.") { + "`str`. Returns the index of the first character in `patt` if " + "found, otherwise returns nil. Search begins from `start` if " + "provided.") { int32_t result; struct kmp_state state; findsetup(argc, argv, &state, 0); @@ -347,11 +348,13 @@ JANET_CORE_FN(cfun_string_hassuffix, } JANET_CORE_FN(cfun_string_findall, - "(string/find-all patt str &opt start-index)", + "(string/find-all patt str &opt start)", "Searches for all instances of pattern `patt` in string " - "`str`. Returns an array of all indices of found patterns. Overlapping " - "instances of the pattern are counted individually, meaning a byte in `str` " - "may contribute to multiple found patterns.") { + "`str`. Returns an array of all indices of found patterns. " + "Overlapping instances of the pattern are counted " + "individually, meaning a byte in `str` may contribute to " + "multiple found patterns. Search begins from `start` if " + "provided.") { int32_t result; struct kmp_state state; findsetup(argc, argv, &state, 0);