First Impressions

Johan Granberg lijat.meREM at OVEgmail.com
Fri Sep 29 22:48:17 PDT 2006


Georg Wrede wrote:
> Geoff Carlton wrote:
>> But even that mostly works, you can iterate through, looking for ASCII 
>> sequences, chop out ASCII and string together more stuff, it all works 
>> because you can just ignore the higher order bytes.  Pretty much the 
>> only thing that fails is if you said "I don't know whats in the 
>> string, but chop it off at index 12".
> 
> Yes.

How should we chop strings on character boundaries?

I have a text rendering function that uses freetype and want to restrict 
the width of the renderd string, (i have to use some sort of search 
here, binary or linear) by truncating it. Right now I use dchar but if 
char is sufficient it would save me conversions all over the place.



More information about the Digitalmars-d mailing list