Not a language particularly suitable for golfing, but I gave it my best shot to cram everything together in best code-golf tradition. Near the end I was making rearrangements that gave net savings of a single character until I could find no more ways to improve it :)
This is 398 characters (or 786 bytes in UTF-16). I challenge anyone to find a way to make it smaller :)
┌───┐ ┌──────────┐
╔╧╗┌─┴╖┌─╖│╔═╗┌──╖┌─╖│
║ ║│>>╟┤_╟┘║1╟┤>>╟┤♯╟┘
╚═╝╘╤═╝╘═╝ ╚═╝╘═╤╝╘═╝
└┐ ┌─┐ ╔══╗┌┴───┐
╔══╗┌┴╖│┌┴╖║32║│ ┌─╖│
║21╟┤×╟┘│♯║╚╤═╝└─┤×╟┘
╚══╝╘═╝ ╘╤╝┌┘ ┌─┐╘╤╝
┌──────┬─┘┌┘ ┌┴╖└─┘
│╔═╗ ┌┴╖┌┘ │−╟┐┌───────╖
│║0║ ┌┤ʘ╟┘┌─┐╘╤╝└┤int→str╟
│╚╤╝ │╘═╝┌┴╖└─┘ ╘═══════╝
│┌┴╖╔╧╗┌─┤×╟┐
└┤ʃ╟╢ ║│ ╘═╝│
╘╤╝╚═╝└┬───┘
│┌─╖┌─┴╖╔═╗╓─╖┌───────╖
└┤_╟┤>>╟╢1║║_╟┤str→int╟
╘═╝╘══╝╚═╝╙─╜╘═══════╝