Task

Increment a numerical string.




var str = "42"
str = (parse(str) + 1).ToString()
 
//Another option:
str = (Integer(str) + 1).ToString()
 
//And another option using interpolation:
str = "\(parse(str) + 1)"
 
print(str) //Outputs 45