Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
To handle a character string
Message
From
22/04/2006 13:14:23
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01115703
Message ID:
01115710
Views:
7
Hi,

>I must reimport an address file.
>
>"Rue de l'université 7 " =====> "Rue de l'université"
>"place victor hugo 7Bte 15" ====> "place victor hugo"
>"rue des mineurs 14b" =====> "rue des mineurs"
>etc...
>
One approach:
PROCEDURE GetStreet
LPARAMETERS lcstr
LOCAL lcret
lcret = ""
LOCAL i
FOR i = 1 TO GETWORDCOUNT(lcstr)
  IF VAL(GETWORDNUM(lcstr,i))> 0
    EXIT
  ENDIF
  lcret = lcret + GETWORDNUM(lcstr,i) + " "
ENDFOR 
RETURN TRIM(lcret)
but there must be lots of others....
Regards,
Viv
Previous
Reply
Map
View

Click here to load this message in the networking platform