contains static method

bool contains(
  1. String str,
  2. Pattern searchPattern, [
  3. int startIndex = 0
])

判断字符串中是否包含xx

Implementation

static bool contains(String str, Pattern searchPattern, [int startIndex = 0]){
  return str != null && str.contains(searchPattern, startIndex);
}