How can I create a function that will allow me to EITHER quickly calculate the # of characters in the longest common substring OR return the longest common substring