« Return to the main article
From the code above (which btw is almost 10 years old!):
dots = fileName.split(".")
//get the part AFTER the LAST period.
fileType = "." + dots[dots.length-1];
It already caters for multiple dots :)
From the code above (which btw is almost 10 years old!):
dots = fileName.split(".")
//get the part AFTER the LAST period.
fileType = "." + dots[dots.length-1];
It already caters for multiple dots :)