From 7774778055531138220
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,cc1a555bbe9617a3
X-Google-Attributes: gidf78e5,public
From: Valentin Bonnard <bonnardv@pratique.fr>
Subject: Re: STL and SGI and strings
Date: 1998/01/19
Message-ID: <34C36B5B.16C0@pratique.fr>#1/1
X-Deja-AN: 317520962
References: <34B57837.41C6@pixar.com> <34B6580F.6A50@pratique.fr> <m3oh1jezw9.fsf@gabi-soft.fr> <34BAA6FB.17121A3E@acm.org> <34BB973F.167EB0E7@pratique.fr> <m37m7xdiq6.fsf@gabi-soft.fr>
X-Original-Date: Mon, 19 Jan 1998 16:03:55 +0100
Reply-To: bonnardv@pratique.fr
Originator: austern@isolde.mti.sgi.com
Organization: Ecole Normale Superieure, Paris, France
X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBVAwUBNMP5hUy4NqrwXLNJAQFkewIAz/aUl4RoDZyxME3S8J8Y1T5aCRpluNKD y6QEVyi9UCxbCkmSsq7seHCo4dcNTgVjiUfoROmm9HWrc7YfksqgPA== =rZ97
Newsgroups: comp.std.c++


J. Kanze <kanze@gabi-soft.fr> writes:

> In the most
> general case, changing an arbitrary character using operator[] will have
> unspecified effects, due to multicharacter encodings.  The only *safe*
> way to change a string is to use the replace function.

Well, if you have a multi-byte encoded text, you should convert 
it _then_ put it into a wstring. The locales gives you the 
convertion function for multi byte encoding.

> Compatible with RandomAccessContainer: I've no idea here.  You'll have
> to tell me what the requirements of a RandomAccessContainer are.  The
> word doesn't occur in the standard.

It's in the SGI STL documentation. It's a containner supporting 
random access iteration and direct access with op[]. If there is 
no equivalent it means that the SGI STL doc is better than the 
std (which isn't surprising anyway).

-- 

Valentin Bonnard                mailto:bonnardv@pratique.fr
info about C++/a propos du C++: http://www.pratique.fr/~bonnardv/
---
[ comp.std.c++ is moderated.  To submit articles: Try just posting with your 
                newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  Comments? mailto:std-c++-request@ncar.ucar.edu 
]



