Hi I have string variable and I need print only max 100 characters but I want dot on end. So I want print summary of string, where in the best case will be dot like 100th char,in worse case 99th car....
If the string is not a dot, I want to print it whole.
for example what I want
$longstring = "abcd. dasda. dsad.sd asd a."
$whaIWant = "abcd. dasda. dsad.sd asd a."
$longstring = "abcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef. abcdefabcdef"
$whaIWant = "abcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef."
How I can do it?