Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Proper() function
Message
 
 
À
09/07/2003 04:08:08
Samir Chheda
Remittag Software Pvt. Ltd.
Mumbai, Inde
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00808359
Message ID:
00808429
Vues:
34
Hi Samir,

Try
? myProper("i am a boy")
FUNCTION myProper(tcText)
LOCAL lcNewText
lcNewText = tcText
IF ISALPHA(tcText)
	lcNewText = UPPER(LEFT(tcText,1)) + SUBSTR(tcText,2)
ENDIF
RETURN lcNewText
>Hi,
>
>I am making a small notepad application and I am allowing the user to change the Case of the text selected by him. The problem with Proper() function is that it changes all the first alphabets of the string to Capital. For example Proper() changes "i am a boy" to "I Am A Boy", which I dont want. It shouls return "I am a boy"
>
>Has anybody written any procedure to make only those alphabets capital which come after a period(.) ???
>
>TIA
>
>Regards,
>Samir.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform