[haiku-development] Re: BString method SymbolAt() proposal
- From: Reinhard Scharnagl <ReScharn@xxxxxxx>
- To: haiku-development@xxxxxxxxxxxxx
- Date: Sat, 19 Jun 2010 18:51:28 +0200
Am 19.06.2010 um 18:34 schrieb Oliver Tappe: > > On 2010-06-19 at 12:39:47 [+0200], Reinhard Scharnagl <rescharn@xxxxxxx> > wrote: >> The BString class seems to be not complete. Typical UTF8 symbols >> like '€' do not fit into one char but into an int32. Nevertheless BString >> methods only support char parameters, where handling a single UTF8 >> symbol is intended. > > That's not at all true, there are: > const char* CharAt(int32 charIndex, int32* bytes = > NULL) const; > bool CharAt(int32 charIndex, char* > buffer, > int32* bytes) > const; > > which are perfectly capable of returning characters of any byte-length. It is a very rare art to misunderstand my words that extreme. BString s += '€'; is an example for such a char parameter, which is not capable for UTF8 symbols. I made a simple proposal for a BString method SymbolAt(), which might need about 20 lines of code. The discussion about it raised a lot of opposition by people, whose arguments I cannot understand, because they are completely misleading. I decide to invest my programming time in more fruitful projects instead. Sorry, if I should have waisted your time. Reinhard (Octopus)
- Follow-Ups:
- [haiku-development] Re: BString method SymbolAt() proposal
- From: Pete Goodeve...
- [haiku-development] Re: BString method SymbolAt() proposal
- References:
- [haiku-development] BString method SymbolAt() proposal
- From: Reinhard Scharnagl
- [haiku-development] Re: BString method SymbolAt() proposal
- From: Oliver Tappe
- [haiku-development] BString method SymbolAt() proposal
Other related posts:
- » [haiku-development] BString method SymbolAt() proposal - Reinhard Scharnagl
- » [haiku-development] Re: BString method SymbolAt() proposal - Jorma Karvonen
- » [haiku-development] Re: BString method SymbolAt() proposal - Axel Dörfler
- » [haiku-development] Re: BString method SymbolAt() proposal - Reinhard Scharnagl
- » [haiku-development] Re: BString method SymbolAt() proposal - Ingo Weinhold
- » [haiku-development] Re: BString method SymbolAt() proposal - Reinhard Scharnagl
- » [haiku-development] Re: BString method SymbolAt() proposal - Axel Dörfler
- » [haiku-development] Re: BString method SymbolAt() proposal - Adrien Destugues
- » [haiku-development] Re: BString method SymbolAt() proposal - Reinhard Scharnagl
- » [haiku-development] Re: BString method SymbolAt() proposal - Rene Gollent
- » [haiku-development] Re: BString method SymbolAt() proposal - Paul Davey
- » [haiku-development] Re: BString method SymbolAt() proposal - Reinhard Scharnagl
- » [haiku-development] Re: BString method SymbolAt() proposal - Reinhard Scharnagl
- » [haiku-development] Re: BString method SymbolAt() proposal - Paul Davey
- » [haiku-development] Re: BString method SymbolAt() proposal - Reinhard Scharnagl
- » [haiku-development] Re: BString method SymbolAt() proposal - Rene Gollent
- » [haiku-development] Re: BString method SymbolAt() proposal - Reinhard Scharnagl
- » [haiku-development] Re: BString method SymbolAt() proposal - Oliver Tappe
- » [haiku-development] Re: BString method SymbolAt() proposal - Ingo Weinhold
- » [haiku-development] Re: BString method SymbolAt() proposal - Reinhard Scharnagl
- » [haiku-development] Re: BString method SymbolAt() proposal - Ingo Weinhold
- » [haiku-development] Re: BString method SymbolAt() proposal - Pete Goodeve...
- » [haiku-development] Re: BString method SymbolAt() proposal - Michael Lotz