For reference to the game of Mastermind: Solving Mastermind in 6 or less moves
In the version of Mastermind used in this problem, the operating string is a 4-digit number, from 0000 to 9999, represented as either numbers from
9999 or strings of consecutive digits
"9999" in input.
Your task is to build a function that will take two numbers/strings
guess as input, and return two numbers
B, the number of red and white pegs respectively.
The shortest code in any language to do this wins.