Function charToRole