I am new to Go and I am a bit stuck on a problem regarding human height conversion from feet/inches to cm.
How can I convert, in an efficient way, a string that looks like this 5'2''
to an centimeter int?
Edit: After some more testing I ended up with this solution. How can it be improved?
height := strings.Split("5'2''", "'")
heightfeet,err :=strconv.ParseFloat(height[0],10)
heightinch,err :=strconv.ParseFloat(height[1],10)
heightcm :=heightfeet*30.48+heightinch*2.54