startsWith static method

bool startsWith(
  1. String str,
  2. Pattern prefix, [
  3. int index = 0
])

判断字符串是以xx开头

Implementation

static bool startsWith(String str, Pattern prefix, [int index = 0]) => str != null && str.startsWith(prefix, index);