Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Extracting a Portion of a String
Message
De
21/12/2007 22:24:07
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
21/12/2007 20:10:08
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01277122
Message ID:
01277138
Vues:
27
>>outer loop counts words split at tilde, inner pulls starting digits from these words until a non-digit is encountered..
>
>I did it like this:
>
>
>
>CLEAR
>
>m.ModString = "23^^C4~21^^C4~22^^C4~27^^C4"
>
>m.ModCount = OCCURS('~', m.ModString)
>
>m.Mods = ''
>
>FOR ModLoop = 1 TO m.ModCount
>	m.Mods = m.Mods + SUBSTR(m.ModString, AT('~', m.ModString, ModLoop) +1, 2)
>ENDFOR
>
>? m.Mods
>
>
>But I think yours is cleaner.

You didn't specify that these will always be two digit groups, so I assumed any number of digits.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform