thombashi / pathvalidate

A Python library to sanitize/validate a string such as filenames/file-paths/etc.
https://pathvalidate.rtfd.io/
MIT License
210 stars 12 forks source link

Choose sanitizing behavior of max_len #27

Open thombashi opened 1 year ago

thombashi commented 1 year ago

For now, sanitizing functions will trim the trailing string when the byte length exceeds the max_len. This behavior may not be preferable in some cases. Make it possible to choose the behavior of sanitizing when a byte length of the value exceeds max_len and change the default behavior.

Choices of behavior:

exislow commented 2 months ago

This function would be awesome!