Converts a string with imperial units to metric units.