Examples (x=1):
ABC -> ABC
ABCDEFGHIJKL -> ABCDE...L
ABCDEFGHIJKLMNOPQRS -> ABCDE...S
(truncating after 5 characters is an arbitrary choice for this question - it will depend on the width of the label of course)
I'm basically looking for the same functionality as truncating in the middle, but where I can specify how many characters to leave on the trailing end. Is this available in Swift or is there a reasonable workaround?