On Sat, 20 Aug 2011 02:24:41 +0900, unDEFER <[email protected]> wrote:
[snip]
The fact which the next code
----
writeln( arr.length );
arr.popFront();
writeln( arr.length );
----
prints 9 after 10 for any array but for UTF-8 and UTF-16 strings may
print as well 8 or lesser, seems too confusing for me.
You can use std.algorithm.count to count the number of elements.
assert([1,2,3].count() == 3);
assert("abc".count() == 3);
assert("あいう".count() == 3);
_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos