DescriptionString replaceWithLiteral should just use strlen, also rename to replace.
The compiler will turn strlen on a literal into an integer, we don't need to use
template magic for it. This also allows replace('x', kConstant) where kConstant
is a literal string to get optimized by the compiler. Previously you'd need to
call replace(UChar a, const String& b) which did a String allocation on the
kConstant to execute the replace.
Committed: https://crrev.com/ff8330c67efc3469abb1d83dc5bf5bb59bbaed97
Cr-Commit-Position: refs/heads/master@{#384513}
Patch Set 1 #Patch Set 2 : remove cast. #Patch Set 3 : Fix NUL insertion in foldQuoteMarksAndSoftHyphens. #Patch Set 4 : Another NUL fix. #Messages
Total messages: 27 (13 generated)
|