convert string of numbers to int in apex code example Example: cast string to integer apex Integer i; String s; s='10'; i=integer.valueof(s);