What is the correct function or cast to compare an unprintable ASCII character value to a string slice

bearophile bearophileHUGS at lycos.com
Fri Mar 28 08:41:20 PDT 2014


Gary Miller:

> if (MyString[0..1])== ???(219)) writeln("ASCII Block found")

enum char block = 219;
...
if (myString[i] == block)
     "ASCII Block found".writeln;

Note that variable/function names in D start with a lower case.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list