BUG: extra leading space in to_string when index=False
- [x] closes #24980 
- [x] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

This PR is mainly from #29670 contributed by @charlesdong1991, and I made a few changes on his work.
The code have passed all tests modified and added in `test_format.py` and `test_to_latex.py`.
Any comment is welcomed!