Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OCCURS() and CHR(34)
Message
From
07/02/2003 16:57:05
 
 
To
07/02/2003 16:37:42
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00750824
Message ID:
00750832
Views:
23
This message has been marked as the solution to the initial question of the thread.
Try something like this:
lcString = ["Hello World"]
?lcString
?OCCURS(["],lcString)
******* Correction *********
?OCCURS(CHR(34),lcString) && It works too
***** End Correction *********
>How do I check for the number of times a double quote occurs in a string using occurs()? I hate to step through the entire string char by char checking for asc(lcstring,i)=34. Assuming that a character string has another character string enclosed within double quotes, how do I count the number of times the double quotes exist in the string? Is there an easier way?

>Here's the slow, long way checking for the letter k:
xiniline="dkdksska1538."
result=";"
FOR i = 1 TO LEN(xiniline)
    result=result+ALLTRIM(STR(ASC(SUBSTR(xiniline,i,1))))+";"
ENDFOR
? (OCCURS('107',result))    && returns 3
>I need to count the number of times a "" appears in the string.
Apoya a Visual FoxPro usandolo legalmente
--
¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º
Espartaco Palma Martínez
SysOp PortalFox
http://www.portalfox.com
esparta@portalfox.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform