Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
hishamco committed Sep 16, 2022
1 parent 28860f7 commit 30eb6b2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ public string Slugify(string text)
}
}

var length = Math.Min(slug.Length - GetTrailingHypenCount(slug.AsSpan()), MaxLength);
var length = Math.Min(slug.Length - GetTrailingHyphenCount(slug.AsSpan()), MaxLength);

return new string(slug.AsSpan()[..length]).Normalize(NormalizationForm.FormC);
}

private static int GetTrailingHypenCount(ReadOnlySpan<char> input)
private static int GetTrailingHyphenCount(ReadOnlySpan<char> input)
{
var hyphenCount = 0;
for (var i = input.Length - 1; i >= 0; i--)
Expand Down

0 comments on commit 30eb6b2

Please sign in to comment.