File name abbreviation
Hello. How can I shorten a message to a certain number of characters?
I need a length of 20 characters, followed by an "..." ellipsis.
For example:
from
"AtlasLoop_3_clap_126 [2024-09-18 040840].wav"
to
"AtlasLoop_3_clap_126..."
I think there is some kind of object that will do this quite simply )
regexp-free version:
[atoi]
[zl slice 8]
[zl group 8]
[itoa]
[sprintf %s…]
atoi/itoa -free version

Roman Thilenius, Thanks a lot!
I added a little logic to this, maybe it will be useful to someone)
If the name is shorter than the specified length, then we write it in full.

In string fashion:

Max Patch
Copy patch and select New From Clipboard in Max.