All notable changes to ValueStringBuilder will be documented in this file. The project adheres to Semantic Versioning.
This is the v2
release of the ValueStringBuilder. There aren't any noticeable changes. Only old framework versions were removed to make further development easier.
- Support for
net6.0
andnet7.0
was removed.
- Added
OverloadResolutionPriority
forSpan
overload for the ctor to keep the current behavior. Reported by [@nsentinel])(https://github.com/nsentinel) in #210.
1.22.0 - 2024-12-18
AppendSpan
method
1.21.1 - 2024-11-08
Append(bool)
is now 33% faster
1.21.0 - 2024-09-20
PadLeft
andPadRight
methods
1.20.0 - 2024-05-02
- New ctor that accepts an initial size
1.19.1 - 2024-04-19
- Some smaller refactorings
1.19.0 - 2024-03-02
- Support for
net9.0
- New
Append
overload that accepts a single character
1.18.6 - 2023-11-03
Dispose
resets theValueStringBuilder
to the initial state, so it doesn't lead to undefined behavior when used again- Use different approach for
Grow
to be a bit more performant
1.18.5 - 2023-10-19
- Fixed a bug, where in
Append
overflows the internal buffer and throws an exception - Use better struct layout to be more cache friendly
1.18.4 - 2023-10-14
- Optimized
Append(scoped ReadOnlySpan<char>)
to be roughly 5% faster - Optimized
AppendLine
to have less overhead
1.18.3 - 2023-09-22
- Enumerator.MoveNext is now a bit faster
1.18.2 - 2023-09-08
- Small refactoring to make the Enumerator.Current readonly
1.18.1 - 2023-08-10
- Fixed
IndexOutOfRangeException
issue when the remaining text length is shorter than the search term
1.18.0 - 2023-06-08
- Added custom enumerator to
ValueStringBuilder
so it can be used inforeach
loops
1.17.0 - 2023-04-13
- Support for
net8.0
1.16.0 - 2023-03-28
- New overloads for
Trim
,TrimStart
andTrimEnd
that accept a character as parameter
1.15.0 - 2023-03-26
- New
Trim
,TrimStart
andTrimEnd
methods
1.14.0 - 2023-03-25
- New overload for
Append
that accepts aReadOnlyMemory
object - New
ToString
overload that accepts aRange
object
- Improvements for
Append
when the type is a boolean
1.13.1 - 2023-03-17
- Remove unused defensive check in
EnsureCapacity
1.13.0 - 2023-03-04
- Added
Reverse
function
- Fixed a bug where two empty strings return the wrong value in (Last)IndexOf
1.12.2 - 2023-02-21
- Fixed CI/CD pipeline
1.12.1 - 2023-02-21
- Remove redundant null check when using
AppendJoin
1.12.0 - 2023-01-09
- Two more overloads for
AppendFormat
for up to 5 generic arguments
1.11.5 - 2023-01-09
- Added SourceLink so that pdbs are delivered as well - Attempt 2
1.11.4 - 2023-01-07
- Added SourceLink so that pdbs are delivered as well
1.11.3 - 2023-01-03
- Remove StringSyntaxAttribute to be public
1.11.2 - 2023-01-03
- Compiler hints for new
AppendFormat
methods
1.11.1 - 2023-01-01
- Refactored
AppendFormat
to be faster especially for longer text.
1.11 - 2023-01-01
- New
AppendFormat
functions (with 1 to 3 arguments).
1.10.6 - 2022-12-30
- Appending value types is roughly 10% faster
1.10.5 - 2022-12-29
- When growing only copy written content to the new buffer and safe some bytes
1.10.4 - 2022-12-27
- Fixed an issue with
LastIndexOf
where it could run out of bounds
1.10.3 - 2022-12-26
- Fixed a bug where
Replace
does something wrong
1.10.2 - 2022-12-16
- Additional null check in static
Concat
- Smaller refactoring
1.10.1 - 2022-11-28
- Minor changes and hints for the JIT
1.10.0 - 2022-11-20
Append(char* value, int length)
overload.
- Better exception when appending
ISpanFormattable
and buffer is not large enough.
1.9.0 - 2022-11-18
- Added
Equals(ReadOnlySpan<char>)
overload
- Slight improvement when appending nullable types to the string builder
1.8.0 - 2022-11-15
- implicit cast operator from
string
andReadOnlySpan<char>
to theValueStringBuilder
with pre-initialized buffer
- various path optimizations for replace logic to use less allocations while being faster
- Removed value type overloads for
Append
andInsert
and just offerAppend(ISpanFormattable)
andInsert(ISpanFormattable)
, which covers more cases.
1.7.0 - 2022-11-12
ToString(startIndex, length)
to get a substring from the builderAppend(Guid guid)
andInsert(Guid guid)
as new overload- Added optional format string for
Append
andInsert
1.6.2 - 2022-11-11
- Slight improvements for
IndexOf
methods
- Some of the exception had the wrong order (message and parameter name)
1.6.1 - 2022-11-11
- Added
net7.0
target
- Updated docs
1.6.0 - 2022-11-10
- Added overload which allows an initial string for the ValueStringBuilder
- Meziantou.Analyzer as developer dependency to spot issues early on
readonly
hint's on readonly methods
- Added
StructLayout(LayoutKind.Auto)
, which makes the ValueStringBuilder not usable for unmanaged code
1.5.1 - 2022-11-05
- Hot paths for strings
1.5.0 - 2022-11-05
- New easy API for concatenating smaller strings or objects via
ValueStringBuilder.Concat("Hello", " ", "World");
- Smaller performance improvements in internal API's
1.4.1 - 2022-11-04
- Smaller internal API improvements
- Smaller performance improvements
1.4.0 - 2022-10-11
- Added the
scoped
keyword to simplify code and allow more scenarios for the user
Grow
allowed values, which would truncate the internally represented string
1.3.0 - 2022-07-25
- Fixed an issue where memory is not returned to the ArrayPool
- Fixed an issue where memory could be overwritten, giving the chance to tamper with the internal array
1.2.0 - 2022-04-20
ValueStringBuilder
constructor can take initial buffer instead of creating it itself.- More compiler hints for inlining.
1.1.0 - 2022-04-16
Contains
method.
- Smaller tweaks in CI/CD
IndexOf
andLastIndexOf
did not return 0 when passing an empty string. Now it is aligned tostring.IndexOf
.
- Debug symbol package (snupkg) due to the many constraints of NuGet.org
1.0.1 - 2022-04-13
- Enabled some optimization hints for the compiler.
- Include debug symbols when publishing to NuGet for easier debugging experience
1.0.0 - 2022-04-12
LastIndexOf
to find the last occurence in the represented string.ReplaceGeneric<T>
added for generic replacement in the string builder. Can have performance / allocation penalties in comparison to the non-generic version.
0.9.5 - 2022-04-10
IndexOf
methods to retrieve the index of the first occurence of a word.Capacity
to give the user an indication if the internal array will grow soon.EnsureCapacity
to set the buffer size to avoid re-allocation in a hot path.
- Some methods throw the wrong exception. When an index is "invalid" then a
ArgumentOutOfRange
exception is thrown.
0.9.4 - 2022-04-09
- Added
AppendJoin
methods.
0.9.3 - 2022-04-09
- Added
Replace
methods which also tries to have the least amount of allocations. - Added
GetPinnableReference
which allows to get the content via thefixed
keyword.
0.9.2 - 2022-04-06
- Added
Remove
andInsert
methods.
0.9.1 - 2022-04-06
This release brings extensions to the ValueStringBuilder
API. For v1.0
the ValueStringBuilder
tries to be en par with theSystem.Text.StringBuilder
.
- Added extension method for
System.Text.StringBuilder
to transform intoValueStringBuilder
without additional allocation and the other way around. - Added
Length
readonly property which gives the length of the represented length. AddedClear
to set theValueStringBuilder
to the initial point.
- Initial release