CDAP interview question

Write a function that accepts a string containing a Roman numeral, and return the equivalent integer number.