New string implementation: dstring 1.0

Fredrik Olsson peylow at gmail.com
Tue Oct 24 01:13:38 PDT 2006


Chris Miller skrev:
> Check out the FAQ at http://www.dprogramming.com/dstring.php and give it 
> a spin.
> Documentation is online at 
> http://www.dprogramming.com/docs/dstring/dstring.html
> 
> Let me know what you think!

I love it! This is very much needed and should go into Phobos yesterday!

Solves the problem of:
char[] foo = "hög";
assert(foo.length == 3); // Sorry UTF-8, this is == 4
assert(foo[1] == 'ö');   // Not a chance!

You implementation of string could be a perfect wrapper that makes the 
fact that UTF-8 is of variable char size, invisible to the programmer.


// Fredrik Olsson



More information about the Digitalmars-d-announce mailing list