How To Turn String Into Int Javascript Substring Function In C