RFR: 8347027: String replaceAll with Function<String, String>
Roger Riggs
rriggs at openjdk.org
Tue May 20 18:58:51 UTC 2025
On Tue, 20 May 2025 16:59:10 GMT, kieran-farrell <duke at openjdk.org> wrote:
> New API to the String.java class - replaceAllMapped(String, Function<MatchResult, String>) that allows regex based replacement via a user defined function allowing dynamic replacemnt based on the match. It delegates to the already existing Pattern.matcher().replaceAll(Function).
Please elaborate on the rationale and use cases. I don't this a compelling API or functionality. Tnx.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/25335#issuecomment-2895494882
More information about the core-libs-dev
mailing list