Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Proper() function
Message
From
11/07/2003 08:38:03
Samir Chheda
Remittag Software Pvt. Ltd.
Mumbai, India
 
 
To
11/07/2003 07:35:52
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00808359
Message ID:
00809156
Views:
35
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform