Add string length limiting utility