Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

output string formatting space before suffix if suffix does not exist #139

Open
jocelynpender opened this issue Oct 11, 2022 · 0 comments
Open

Comments

@jocelynpender
Copy link

I have this name:
John Smith
I'd like to reformat the name to look like this:
Smith, John

I've set the formatting I'd like to use:

from nameparser.config import CONSTANTS
CONSTANTS.string_format = "{last} {suffix}, {title} {first} ({nickname}) {middle}"

The result I get is:
Smith , John
due to the space that precedes {suffix} in my string_format.

However, I'd like the suffix to follow the last name if it ever occurs. Does your package allow for the trimming of space if no suffix exists, or should I implement this on my end?

Apologies if this is already addressed in the documentation! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants