apache / apache/lucenenet

Change `StringBuilder.Remove` to J2N appropiate methods

Open
#664 0 comments 0 reactions 1 assignee Claimed by @paulirwin View on GitHub
is:enhancement is:task pri:normal
Dominant language
C#
Stars
2.4k
Forks
658
Avg merge
3d 5h
Merged PRs (30d)
9

Description

Originally discussed in #654

TLDR:
`StringBuilder.Remove` should be replaced with `StringBuilder.Delete` (From J2N)
`StringBuilder.Remove` followed by `StringBuilder.Insert` replaced with `StringBuilder.Replace` (From J2N)

Be aware that the J2N methods uses .NET semantics `startIndex` and length where as the Java source uses `startIndex` and `endIndex` which means the parameters doesn't match 1:1. See #654 for more information.

Note: We should be checking against the Lucene 4.8.0 or 4.8.1 source to be sure that the methods match the original Java code.

Lucene 4.8.0 source can be found here: https://github.com/apache/lucene-solr/tree/releases/lucene-solr/4.8.0/lucene
Lucene 4.8.1 source can be found here: https://github.com/apache/lucene-solr/tree/releases/lucene-solr/4.8.1/lucene

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.