Why any! with map! is not working here
rnd
r_narang at yahoo.com
Thu Jun 6 09:01:11 UTC 2019
I am trying to check if any character in the string is > 127 by
following function:
import std.algorithm.searching;
import std.algorithm.iteration;
bool isBinary(char[] ss){
return (any!(map!(a => a > 127)(ss)));
}
However, I am getting this error:
Error: variable ss cannot be read at compile time
I also tried:
bool isBinary(char[] ss){
return (any!(ss.map!(a => a > 127)));
}
But I get error:
Error: template identifier map is not a member of variable
mysrcfile.isBinary.ss
How can this be corrected?
More information about the Digitalmars-d-learn
mailing list