ASCIIString

ASCII-Only String

struct ASCIIString {
string s;
}

Alias This

s

Examples

1 import std.algorithm;
2 import std.range.primitives;
3 auto s = "タネなし手品";
4 auto asc = s.ASCIIString;
5 assert(s.front == 'タ');
6 assert(asc.front == "タ"[0]);
7 assert(s.back == '品');
8 assert(asc.back == "品"[$-1]);

Meta