Longest Prefix Length

Longest Prefix

Given two strings, a and b, return the length of the longest shared prefix. For example, if the two strings were hello and help your method should return 3 because both strings start with hel.

This should be done in a case sensitive manner. That is Hello and HELLO should return 1 because only the H is shared by the two strings.

If there isn't a matching prefix, return 0.