PRBool hasNonDigitChar = PR_FALSE; for (int i = 0; i<domainLength; i++) { if (!nsCRT::IsAsciiDigit(domain[i]) && domain[i] != '.') { hasNonDigitChar = PR_TRUE; break; } } if (!hasNonDigitChar) { return PR_FALSE; }
cookie_IsInDomain(char* domain, char* host, int hostLength) {  int domainLength = PL_strlen(domain);  /*   * special case for domainName = .hostName   *    e.g., hostName = netscape.com   *          domainName = .netscape.com   */  if ((domainLength == hostLength+1) && (domain[0] == '.') &&       !PL_strncasecmp(&domain[1], host, hostLength)) {    return PR_TRUE;  }  /*   * normal case for hostName = x<domainName>   *    e.g., hostName = home.netscape.com   *          domainName = .netscape.com   */  if(domainLength <= hostLength &&      !PL_strncasecmp(domain, &host[hostLength-domainLength], domainLength)) {    return PR_TRUE;  }  /* tests failed, not in domain */  return PR_FALSE;}