Jack Skelley wrote on 2011-01-25: > Tracy: Thanks. I realize that but don't want to include foxtools in the > system... Regards, > > Jack >
Jack, I don't know of a sure way to get all spaces on a single command line. Though this works cText = "Spaces Test" DO WHILE AT(SPACE(2), cText) > 0 cText = STRTRAN(cText, SPACE(2), SPACE(1)) ENDDO ?LEN(cText) This would probably be faster with large amounts of text cText = "Spaces Test" cLast = "-" cCurrent = "" cNew = "" FOR nSpaceLoop = 1 TO LEN(cText) cCurrent = SUBSTR(cText, nSpaceLoop, 1) IF cCurrent = SPACE(1) AND cLast = SPACE(1) ELSE cNew = cNew + cCurrent cLast = cCurrent ENDIF NEXT ?LEN(cNew) Yet, the REDUCE function is C and faster yet. YMMV Tracy Pearson PowerChurch Software _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/002a01cbbcd8$f493b5f0$ddbb21d0$@com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

