Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
PROPER case for sentences
Message
De
05/02/1999 18:08:42
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00184375
Message ID:
00184576
Vues:
15
>>
  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.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform