Return ASCII value as uint
Stewart Gordon
smjg_1998 at yahoo.com
Thu May 10 16:44:40 PDT 2007
"John Ohno" <john.ohno at gmail.com> wrote in message
news:f1q9n0$1bd$1 at digitalmars.com...
<snip>
> A good general template function (will work for anything that can be
> explicity casted to uint, including chars, doubles, and pointers):
>
> uint toUint!(T)(T c) {
> return (cast(uint)c);
> }
Is there really any point using this when you can just cast when you need
to? OK, so it saves two characters where it's used....
Stewart.
More information about the Digitalmars-d-learn
mailing list