We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
substrings
1 parent 1fbeaf9 commit 9c39584Copy full SHA for 9c39584
1 file changed
src/org/rascalmpl/library/String.rsc
@@ -742,6 +742,11 @@ str(str) indentTabsAsSpaces(int tabSize) {
742
}
743
744
@synopsis{Compute all possible strict substrings of a string.}
745
+@pitfalls{
746
+* Does not include the empty string.
747
+* Does not include the input string itself.
748
+* The number of substrings is quadratic in the size of the string; expensive to compute.
749
+}
750
set[str] substrings(str input)
751
= {input[i..i+l] | int i <- [0..size(input)], int l <- [1..size(input)], i + l <= size(input)};
752
0 commit comments