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

The code did not work on the string sent by you. I have made some modifications in the code. It works fine, but there is one more problem with it. When a string has more than one consecutive dots(.), it fails.

Try, the code using the following string -
abc.def..ghi...

If you find some solution, please let me know.

Regards,
Samir

*****Code snippet
Local lcNewText

lcNewText = ""
tcText = Ltrim(tcText)
cTmp = ""
iCnt = 0
For iLen = 1 To Getwordcount(tcText,'.')
lcNewText = LOWER(Substr(tcText,iCnt+1,IIF(Atc('.',Right(tcText,Len(tcText)-iCnt))=0,Len(tcText)-iCnt,Atc('.',Right(tcText,Len(tcText)-iCnt)))))

iCnt = iCnt + LEN(lcNewText)

lcNewText = ALLTRIM(lcNewText)

lcNewText = UPPER(Left(lcNewText,1)) + Substr(lcNewText,2)

cTmp = cTmp + lcNewText + SPACE(1)
Endfor
lcNewText = cTmp
Return Rtrim(lcNewText)

**********
Attitude Determines Altitude
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform