Skip to content

Conversation

@Sergio0694
Copy link
Contributor

Contributes to #698.

Conditionally implements ISpanFormattable and IUtf8SpanFormattable interfaces for Utf8String when targeting .NET 10.0 or greater. Adds TryFormat and ToString overloads to improve formatting and span-based operations.
Introduced two new tests: one to verify Utf8String formatting with DefaultInterpolatedStringHandler, and another to test TryFormat, buffer writing, and internal caching behavior. These tests improve coverage for Utf8String's formatting and formattable features.
@github-actions

This comment has been minimized.

Copy link
Owner

@Washi1337 Washi1337 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small things but other than that lgtm

Changed preprocessor directives from NET10_0_OR_GREATER to NET6_0_OR_GREATER for ISpanFormattable interface and related methods, ensuring compatibility with .NET 6 and above. Also adjusted #endif placement for clarity.
Cleaned up formatting by removing extra blank lines in TryCopyTo methods of Utf8String.cs for improved code readability.
@github-actions
Copy link

Test Results

Total Skipped Passed Failed
Unique 2122 5 💤 2122 ✅ 0 ❌
Total 4244 34 💤 4210 ✅ 0 ❌

Failing runs

@Washi1337 Washi1337 merged commit 68db524 into Washi1337:development Dec 18, 2025
7 checks passed
@Washi1337 Washi1337 added this to the 6.0.0 milestone Dec 18, 2025
@Washi1337 Washi1337 added enhancement dotnet Issues related to AsmResolver.DotNet performance and removed dotnet Issues related to AsmResolver.DotNet labels Dec 18, 2025
@Sergio0694 Sergio0694 deleted the user/sergiopedri/formattable-utf8string branch December 18, 2025 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants