isBinary static method

bool isBinary(
  1. String s
)

检验字符串是否是二级制

Implementation

static bool isBinary(String s) => hasMatch(s, r'^[0-1]+$');