How to apply a function to the title of a teaser made with display suite?
If you added the title as a field in Display Suite, I'd recommend you look at the field functions of Display Suite.

You may use a Code field, but I'd discourage that. 

Rather remove the title from the display, then add the truncated title as a new field in the preprocess function, ie:

$variables['new_title'] = truncate_utf8($variables['title'], 48, TRUE, TRUE);


Then add a new preprocess field to display suite, using the exact same name as the new field, ie:

new_title


You can then place this new field in Display Suite.