Tag: string

Reduce a String

This morning i needed to reduce any given string to a certain length and then place a pattern at the end of the string, in this case a simple ‘….’ but the reduction had to take into account full words, meaning, i didnt want to just split the string in any old place and leave parts of a word in the final string. So i created this little String Exstension which i thought may come in useful for some other people! Seems to work great for me….

Back To Top