-
-
Save Neme12/dfebe11d09909f8d7bbb6463d194c2a9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int count = 0; | |
var span = source.AsSpan(); | |
while (true) | |
{ | |
var index = span.IndexOf('/'); | |
if (index == -1) | |
break; | |
count++; | |
span = span.Slice(index + 1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment