isURL method

bool isURL(
  1. String s
)

Is this URL?

Implementation

bool isURL(String s) {
  if (s.substring(0, 7) == "http://" ||
      s.substring(0, 8) == "https://" ||
      s.substring(0, 7) == "file://") {
    return true;
  } else {
    return false;
  }
}