Conversion function (char to int)