Files
tubestation/xpcom/string
Nika Layzell fb603791ab Bug 1944365 - Part 2: Add a fallible version of the substring tuple replace overload, r=xpcom-reviewers,mccr8
This overload removes the need for an extra copy when concatenating
multiple `nsTSubstring`s together to pass to a fallible `Replace`
function.

This slightly reduces the quality of the allocation failure error
reporting, as the infallible variant may report the wrong size if the
failed allocation is the tuple-flattening allocation in the case where
the tuple is dependent on the mutating string buffer. I expect this is
an uncommon situation, and felt that the extra code complexity from
duplicating the codepaths was not worth the OOM failure size accuracy.

Differential Revision: https://phabricator.services.mozilla.com/D236273
2025-02-10 15:34:19 +00:00
..

<html>
  <!-- This Source Code Form is subject to the terms of the Mozilla Public
   - License, v. 2.0. If a copy of the MPL was not distributed with this
   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
  <body>
    <h1><span class="LXRSHORTDESC">managing sequences of characters</span></h1>
    <p>
      <span class="LXRLONGDESC"></span>
    </p>
  </body>
</html>