Skip to content

Commit d691376

Browse files
author
ladeak
committed
Using ref struct string interpolation with string builder
1 parent e35e565 commit d691376

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Http/Headers/src/ContentDispositionHeaderValue.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -683,9 +683,7 @@ private static string Encode5987(StringSegment input)
683683

684684
private static void HexEscape(StringBuilder builder, byte b)
685685
{
686-
builder.Append('%');
687-
builder.Append(HexUpperChars[(b & 0xf0) >> 4]);
688-
builder.Append(HexUpperChars[b & 0xf]);
686+
builder.Append(CultureInfo.InvariantCulture, $"%{HexUpperChars[(b & 0xf0) >> 4]}{HexUpperChars[b & 0xf]}");
689687
}
690688

691689
// Attempt to decode using RFC 5987 encoding.

0 commit comments

Comments
 (0)