Skip to content

Commit bd5f794

Browse files
committed
fix
1 parent ea4f1e7 commit bd5f794

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/Shared/TagWriter/TagWriter.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,11 @@ protected abstract void OnUnsupportedTagDropped(
205205
string tagKey,
206206
string tagValueTypeFullName);
207207

208+
private static ReadOnlySpan<char> TruncateString(ReadOnlySpan<char> value, int? maxLength)
209+
=> maxLength.HasValue && value.Length > maxLength
210+
? value.Slice(0, maxLength.Value)
211+
: value;
212+
208213
private void WriteCharTag(ref TTagState state, string key, char value)
209214
{
210215
Span<char> destination = [value];

0 commit comments

Comments
 (0)