isYTplaylistID method

bool isYTplaylistID(
  1. String s
)

Is this youtube playlist ID?

Implementation

bool isYTplaylistID(String s) {
  if (isPath(s) || isEnclst(s)) {
    return false;
  } else {
    if (s.substring(0, 2) == "PL") {
      if (s.length == 18 || s.length == 34) {
        return true;
      } else {
        return false;
      }
    } else {
      return false;
    }
  }
}