Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
InStr substitute
Message
De
28/03/2003 08:47:00
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00771253
Message ID:
00771268
Vues:
17
This message has been marked as a message which has helped to the initial question of the thread.
>I don't think there's an inStr function in FoxPro... although it's 99.9% likly that I'm mistaken.
>
>If there's not, is there a substitute function that I can use to do something like this:
>
>myString = "kdjfkjsf hjhuei oioiuwquiod john uhehjkdf hasjhdkh"
>:now I need something to detect the "john" in the string and return it and everything to the right of it including itself:
>
>myString = "john uhehjkdf hasjhdkh"

Use at() to get the position. Be sure to check whether it is found (at() returns 0 if nothing is found).

Let's say you save it to a variable, like lnPosition.

substr(MyString, lnPosition) (without the third parameter) will return you the remainder of the string.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform