Single byte version of CopyUnicodeTo() needed.

RESOLVED INCOMPLETE

Status

()

Core
String
RESOLVED INCOMPLETE
17 years ago
9 years ago

People

(Reporter: jst, Assigned: jag (Peter Annema))

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

17 years ago
I ran into some code where I'd like to use a char version of the CopyUnicodeTo()
function in the string library, specifically the one that copies the data
between two iterators, here's what I'd like to have:

void 
CopyUTF8To( const nsReadingIterator<char>& aSrcStart,
            const nsReadingIterator<char>& aSrcEnd,
            nsACString& aDest )
  {
    nsWritingIterator<char> writer;
    aDest.SetLength(Distance(aSrcStart, aSrcEnd));
    aDest.BeginWriting(writer);
    nsReadingIterator<char> fromBegin(aSrcStart);

    copy_string(fromBegin, aSrcEnd, writer);
  }

Comment 1

16 years ago
giving up ancient string bugs to the new string owner.  jag, you'll want to sort
through these and see which ones still apply and go with or against the
direction in which you intend strings evolve
Assignee: scc → jaggernaut
QA Contact: scc → string

Updated

9 years ago
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.