Closed Bug 80522 Opened 23 years ago Closed 15 years ago

Single byte version of CopyUnicodeTo() needed.

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: jst, Assigned: jag+mozilla)

Details

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);
  }
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
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → INCOMPLETE
Component: String → XPCOM
You need to log in before you can comment on or make changes to this bug.