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

Add trimDelimiter option #36

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ausi
Copy link
Owner

@ausi ausi commented Sep 8, 2023

Alternative to #35

@Rumi-Aguirre would this be enough for your use case?

@ausi ausi self-assigned this Sep 8, 2023
@Rumi-Aguirre
Copy link

For my needs I would really need to be able to differentiate between the initial and final delimiter, and to be able to remove one, both or none of them @ausi

@ausi
Copy link
Owner Author

ausi commented Sep 13, 2023

For this case it should be easy to remove the delimiter from one side after the generation, e.g.:

ltrim($generator->generate('-foo-', ['trimDelimiter' => false]), '-'); // foo-
rtrim($generator->generate('-foo-', ['trimDelimiter' => false]), '-'); // -foo

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

Successfully merging this pull request may close these issues.

2 participants