I would like to truncate a long path to specific length. However, I want to have the ellipsis in the middle.
for example: \\my\long\path\is\really\long\and\it\needs\to\be\truncated
should become (truncated to 35 chars): \\my\long\path\is...to\be\truncated
Is there a standard function or extension method available?
There is no standard function or extension method, so you will have to roll your own.
Check for length and use something like;