Skip to content

Commit 3e3d136

Browse files
committed
Simplified AppendLine
1 parent 28cf4a3 commit 3e3d136

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ All notable changes to **ValueStringBuilder** will be documented in this file. T
88

99
### Changed
1010

11-
- Optimized `Append(scoped ReadOnlySpan<char>)` to be roughly 5% faster.
11+
- Optimized `Append(scoped ReadOnlySpan<char>)` to be roughly 5% faster
12+
- Optimized `AppendLine` to have less overhead
1213

1314
## [1.18.3] - 2023-09-22
1415

src/LinkDotNet.StringBuilder/ValueStringBuilder.Append.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,7 @@ public void Append(ReadOnlyMemory<char> memory)
9898
[MethodImpl(MethodImplOptions.AggressiveInlining)]
9999
public void AppendLine(scoped ReadOnlySpan<char> str)
100100
{
101-
Append(str);
102-
Append(Environment.NewLine);
101+
Append(string.Concat(str, Environment.NewLine));
103102
}
104103

105104
[MethodImpl(MethodImplOptions.AggressiveInlining)]

0 commit comments

Comments
 (0)