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?



Reply via email to