fixes to use lcase

This commit is contained in:
Doug Bird 2017-12-13 23:07:52 -08:00
parent 1f0e039b6e
commit 9592365573
2 changed files with 4 additions and 4 deletions

View File

@ -7,7 +7,7 @@ let tldCheck;
tldCheck = "com";
console.log("Is '" + tldCheck + "' a real TLD?");
if (tldEnum.tldList.indexOf(tldCheck) != -1) {
if (tldEnum.tldList.indexOf(tldCheck.toLowerCase()) != -1) {
console.log(" yes");
} else {
console.log(" no");
@ -15,7 +15,7 @@ if (tldEnum.tldList.indexOf(tldCheck) != -1) {
tldCheck = "somethingWeird";
console.log("Is '" + tldCheck + "' a real TLD?");
if (tldEnum.tldList.indexOf(tldCheck) != -1) {
if (tldEnum.tldList.indexOf(tldCheck.toLowerCase()) != -1) {
console.log(" yes");
} else {
console.log(" no");

View File

@ -8,7 +8,7 @@ echo "There are " . count(TldEnum::TLD_ENUM) . " IANA TLDs\n";
$tldCheck = "com";
echo "Is '$tldCheck' a real TLD?\n";
if (in_array($tldCheck, TldEnum::TLD_ENUM)) {
if (in_array(strtolower($tldCheck), TldEnum::TLD_ENUM)) {
echo " yes\n";
} else {
echo " no\n";
@ -16,7 +16,7 @@ if (in_array($tldCheck, TldEnum::TLD_ENUM)) {
$tldCheck = "somethingWeird";
echo "Is '$tldCheck' a real TLD?\n";
if (in_array($tldCheck, TldEnum::TLD_ENUM)) {
if (in_array(strtolower($tldCheck), TldEnum::TLD_ENUM)) {
echo " yes\n";
} else {
echo " no\n";