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?
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.