function fncIsNull(value) {
 if (value == null || (typeof(value) == "String" && value.trim() == "")) {
  return true;
 }
 return false;
}

function fncGetFileExtension( filePath ) {
 var extension = "";

    if(fncIsNull(filePath)){
        return extension = "";
    }

    extension = filePath.substring( filePath.lastIndexOf('.') + 1, filePath.len );

 return extension; 
}

+ Recent posts