There are two ways to do this actually:

$string = readprofilestring(...)

$sum = val($string) + val($string)

-or-

$sum = 0 + $string + $string

the second one is odd, but because the expression starts with a number, the strings get converted into numbers.