Skip to content

Truncate at specific character #22

@koganei

Description

@koganei

Hi guys,

really enjoying your library. I was wondering if it was possible to add a feature where you can truncate at a specific character. Our use-case is a location delimited by slashes like so: Canada/Quebec/Montreal.
We would like to be able to truncate to the closest slash that won't cut off the next word. In our case it would be a left truncation, but either way would be great.
I'm sure there are other use cases where one would want this on spaces or commas specifically so that no word gets cut off halfway.

Let me know if you need more info.

Thanks

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions