вт, 24 мар. 2026 г. в 18:45, Christopher Schultz <[email protected]>:
>
[...]
> >
> > If you decide to implement this feature, please make it configurable.
>
> +1
>
> Unfortunately, I *think* the performance characteristics will be
> different depending upon what kind of delimiter is being used. Searching
> for a single code point ('&') is faster than searching for a substring
> ("&amp;"). I would also imagine that searching for '&' is faster than
> searching for "&" (char vs string). I would like to keep this as fast as
> possible, so I suspect there will only be two options, here: & or &amp;
> and the search-and-replacement will use two different mechanisms.

+1 for the proposed two options.

BTW, If one wants, there is a way to combine the two searches:
search for the leading '&' and use String.regionMatches() to test for
the following "amp;".

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to