Yes, that is the right idea. To be more precise, the invertible continuous function maps the open unit interval onto the whole real line.

Of course there can never be an isometric map between these two spaces, because the line contains points whose distance apart is greater than 1, whereas the unit interval doesn't.