in reply to Smart Substrings

The perl DBI module provides a function for this:

$option = DBI::neat($string, 15);