On 2011-08-03 09:34, Pelle wrote:
On Wed, 03 Aug 2011 08:29:09 +0200, Jacob Carlborg <d...@me.com> wrote:Yes, convert the first code point to a wchar and then throw if there's more the one character in the string.Not tested, and I might be wrong, but 'to!' should work between dchar and wchar, no? wchar to_wchar(string s) { auto c = s.front; s.popFront(); assert (s.empty); return to!wchar(c); }
Ok, thanks. -- /Jacob Carlborg