You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is another change to bring string.replace() in line with the spec. Safe to modify the flag since it has not been released yet.
Eliminated use of parameterization in test suite since it caused test cases that didn't need it to be cloned.
Also add RELNOTES in this CL for the flag.
Follow-up work to #9181.
RELNOTES: Added --incompatible_string_replace_count, to make string.replace() behave as in Python.
PiperOrigin-RevId: 309483323
Description of the problem:
According to the spec, a negative value for
count
instring.replace
should be ignored and this is also what python and the Go implementation do.Side Note: The parameter
count
ofstring.replace
is incorrectly namedmaxsplit
in the definition ofreplace
here.The text was updated successfully, but these errors were encountered: