CareerBuilder Interview Question

Whiteboard question onsite: Write a function to convert any roman numeral string to its equivalent integer. You may assume that we we not send it anything that is not a valid roman numeral string.