Adding flag to truncate string at word boundaries

Adding one optional flag to truncate string at word boundaries.