Typescript Variable Within Stringstream Cppreference Algorithm