Skip to content

Conversation

@MillhioreBT
Copy link
Contributor

Solution for #12
line 342 auto-formatted, sorry.

Ok((success, results)) => {
if success && !results.is_empty() {
let replacement = if results[0].is_nil() {
s_str[m.start..m.end].to_string()
Copy link
Owner

Choose a reason for hiding this comment

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

you can repalce with result.push_str(s_str[m.start..m.end]) donot need to_string

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks

@MillhioreBT MillhioreBT requested a review from CppCXY January 19, 2026 10:10
@MillhioreBT MillhioreBT force-pushed the string_replacement_with_function branch from 9eb5e72 to ce58a6f Compare January 19, 2026 10:14
@CppCXY CppCXY merged commit 9de1afd into CppCXY:main Jan 20, 2026
4 checks passed
@MillhioreBT MillhioreBT deleted the string_replacement_with_function branch January 20, 2026 10:07
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.

2 participants