Truncate filename

Truncates a filename given a maximum length
The name is truncated in the middle of the string and the file extension is preserved.
Raw
Maximum Length
Result
Raw
lorem-ipsum-dolor.png
Maximum Length
15
Result
lore...olor.png
Raw
lorem-ipsum-dolor.png
Maximum Length
30
Result
lorem-ipsum-dolor.png
Transform
Arguments
value : string
maxLength : number
Return type
string
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.