Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

J2N.Text.StringBuffer: Fixed bugs and added new APIs #73

Merged
merged 7 commits into from
Dec 27, 2023

Conversation

NightOwl888
Copy link
Owner

New APIs:

namespace J2N.Text
{
    public class StringBuffer
    {
        public void CopyTo(int sourceIndex, Span<char> destination, int count); // .NET Framework 4.5+
        public StringBuffer Insert(int index, ReadOnlySpan<char> value); // New legacy support for .NET Framework 4.5+
        public StringBuffer InsertCodePoint(int index, int codePoint);
    }
}

Bugs Fixed:

  • Directory.Build.Targets: Removed FEATURE_CHARARRAYPOINTERS, which is a duplicate of FEATURE_STRINGBUILDER_APPEND_CHARPTR
  • J2N.Text.StringBuffer::Append(StringBuffer, int, int): Fixed implementation to correctly pass in StringBuffer.builder to the Append call

Performance Optimizations

  • Directory.Build.targets: Added FEATURE_STRINGBUILDER_APPEND_STRINGBUILDER to optimize for when this overload is available in .NET.

@NightOwl888 NightOwl888 merged commit 04a4170 into main Dec 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant