>>
IF lCapitalize=.T.
>> cNewstring=cNewstring+upper(cChar)
>> lCapitalize=.F.
>> LOOP
>> ENDIF
>> IF asc(cChar)=46
>> lCapitalize=.T.
>> ENDIF
>> cNewstring=cNewstring+cChar
>>ENDFOR
>>=messagebox(cNewstring)
>>
>
>Great code, but I suggest you look for !, ?, etc, besides just period.
>
>Cheers,
Another gotcha: in English and French, ordinal numbers are created by adding suffixes (-nd, -rd, -th, -eme etc); in many other languages they simply get a period, so "45. street" is equivalent to "45th street". Of course, spelling checkers aren't aware of this, so even in Word I have to take care of capitalization myself, or keep it turned on, but every time I write a year (which is pronounced as ordinal number in my language), I put the period after it, type a couple of words, get back and decapitalize the first word after the year and then quickly get the cursor the hell away from there, so this word is no more in the grammar checking zone.
So, if you're capitalizing after a period, check if the character _before_ it is a digit; if it is, don't.