We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8f2a0b4 commit 94d5cacCopy full SHA for 94d5cac
src/LinkDotNet.Blog.Web/Shared/ShortBlogPost.razor
@@ -54,17 +54,16 @@
54
readTime = (int)Math.Ceiling(readTimeInPrecision / 60);
55
}
56
57
- private int GetAllOccurrences(string text, string lookup)
58
- {
59
- var currentPosition = -1;
60
- var count = 0;
61
-
62
- while ((currentPosition = text.IndexOf(lookup, currentPosition + 1, StringComparison.Ordinal)) != -1)
+ private int GetAllOccurrences(string text, string lookup)
63
{
64
- count++;
65
- }
+ var currentPosition = -1;
+ var count = 0;
66
67
- return count;
68
+ while ((currentPosition = text.IndexOf(lookup, currentPosition + 1, StringComparison.Ordinal)) != -1)
+ {
+ count++;
+ }
69
+ return count;
70
0 commit comments