From e675dcfcc441fb18cc1fc330d678b54c365c95b0 Mon Sep 17 00:00:00 2001 From: Remo Senekowitsch Date: Sun, 24 Sep 2023 18:32:01 +0200 Subject: [PATCH 1/2] series: Clarify edge case of zero-length substrings --- exercises/practice/series/.docs/instructions.append.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 exercises/practice/series/.docs/instructions.append.md diff --git a/exercises/practice/series/.docs/instructions.append.md b/exercises/practice/series/.docs/instructions.append.md new file mode 100644 index 000000000..dbed8457d --- /dev/null +++ b/exercises/practice/series/.docs/instructions.append.md @@ -0,0 +1,6 @@ +# Instructions append + +What do you expect the result to be if the length of the substrings is zero? +There is no one right answer, but we expect you to output a number of empty strings: +one more than the length of the input string. +While not intuitive to everyone, this upholds the property that the number of substrings is one more than the length of the input string minus the length of the substrings. From 2036491e1e837b85f453403de9c7efd9ceeddbb5 Mon Sep 17 00:00:00 2001 From: Remo Senekowitsch Date: Sun, 24 Sep 2023 21:30:04 +0200 Subject: [PATCH 2/2] simplify --- exercises/practice/series/.docs/instructions.append.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/exercises/practice/series/.docs/instructions.append.md b/exercises/practice/series/.docs/instructions.append.md index dbed8457d..d55ab1e1b 100644 --- a/exercises/practice/series/.docs/instructions.append.md +++ b/exercises/practice/series/.docs/instructions.append.md @@ -1,6 +1,4 @@ # Instructions append -What do you expect the result to be if the length of the substrings is zero? -There is no one right answer, but we expect you to output a number of empty strings: -one more than the length of the input string. -While not intuitive to everyone, this upholds the property that the number of substrings is one more than the length of the input string minus the length of the substrings. +Different languages on Exercism have different expectations about what the result should be if the length of the substrings is zero. +For Rust, we expect you to output a number of empty strings, which will be one greater than the length of the input string.