How to convert characters of a string "One" into an Integer "1" in swift : <p>I have implemented an quiz application in swift 4.0. Here, user can enter his choice from  ("one" or "1") to ("four" or "4") .</p>

<p>If the user can provide his choice as an integer(Eg 1,2,3, or 4)then there is no issue.
but if he provide his choice as an alphabet characters (Eg "one","two", ..), then i am facing the issues while validating correct answer.</p>

<p>Kindly, could anyone help me, How to convert  word characters "one" into integer 1 etc..</p>

<p>thanks a lot in advance.</p>
