Skip to content

Commit

Permalink
avoid string alloc in SlugGenerator
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp authored and oskardudycz committed May 19, 2024
1 parent e2232ad commit 711ca40
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ namespace ProjectManagement.Workspaces.Slug;
public static class SlugGenerator
{
public static string New(string name) =>
$"{name}-{Guid.NewGuid().ToString().Replace("-", "")[..5]}";
$"{name}-{Guid.NewGuid().ToString("N")[..5]}";
}

0 comments on commit 711ca40

Please sign in to comment.