Longest String Prefix

Longest String Prefix

Given two strings, a and b, return a string containing the longest matching suffix.

For example, if using the two strings hello and help, your method would return hel because both strings start with hel.

This should be a case sensitive match. longestPrefix( "HELLO", "Hello" ) would return H because that is the longest case sensitive prefix.

If there is no match, return an empty string.