Commit 6601d97
authored
Improve LogAnalysis tests (#1696)
I noticed that a lot of the community solutions to the SubstringBetween where simply accidentally correct, doing
s.Substring(s.IndexOf(first) + first.Length, s.IndexOf(last) - last.Length);
i.e. thinking that the length of the last delimiter is relevant, which looks symmetrical to the handling of the first Substring parameter, and just happens to be correct on the provided string.1 parent ef7343b commit 6601d97
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
25 | 31 | | |
26 | 32 | | |
27 | 33 | | |
| |||
0 commit comments