Here is an example of what i need.
Suppose that we have the following string:
str = "/home/user/folder/MyVeryLongFileName.foo"
I have multiple operations to do on this one :
remove the path (assuming i have its length) :
str = str[path_length:]
revome the extension (always 4 char in my case) :
str = str[path_length:-4]
So, right now my string looks like
MyVeryLongFileName
Now I would like to limit its size at 15 characters. Is it possible to do it in the same expression ? Or may I have to do it after the 2 previous operations ?