Yet another way to implement snake_to_string