slug-generator
slug-generator copied to clipboard
Add trimDelimiter option
Alternative to #35
@Rumi-Aguirre would this be enough for your use case?
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
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