Return a String as an Integer

Published by Nomove in

Create a function that takes a string and returns it as an integer.

Examples

StringInt("6") ➞ 6

StringInt("1000") ➞ 1000

StringInt("12") ➞ 12

Notes

  • All numbers will be whole.
  • All numbers will be positive.
Watch a quick demo on how Edabit works.