Just another update

This commit is contained in:
Ingy döt Net 2015-02-20 00:35:01 -05:00
parent a25938f123
commit 00a190b0a6
6591 changed files with 94363 additions and 23227 deletions

View file

@ -1,13 +1,12 @@
import std.stdio, std.utf;
void main() {
import std.stdio, std.utf;
string test = "a";
size_t index = 0;
// Get four-byte utf32 value for index 0
// this returns dchar, so cast it to numeric.
writeln(cast(uint)test.decode(index));
// Get four-byte utf32 value for index 0.
writefln("%d", test.decode(index));
// 'index' has moved to next character position in input.
// 'index' has moved to next character input position.
assert(index == 1);
}