Hide some caracters


I image thats easy but how i dont know program... i need you help.

Some of my users have long nicknames:


my idea is show a (...) in the name of avatars frame. In that exemple: Dtgilliim...

In this way i dont need to change the login of the user.

Maybe if a use a variable to receive the name, taking a x number o caracters and showing this variable ending with ...

How can i do that?