fork(5) download
  1. import std.c.stdio;
  2.  
  3. int main() {
  4. string str = "429*(69-37)+(8-6)/2";
  5. bool isDigit(char x) { return (x >= '0') && (x <= '9'); };
  6. //auto tokens = str.chunkBy!((a,b) => isDigit(a) && isDigit(b));
  7. printf("%d %d", isDigit('5'), isDigit('f'));
  8. return 0;
  9. }
  10.  
Success #stdin #stdout 0s 2820KB
stdin
stdout
1 0