Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting numeric position of last string in a string
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Getting numeric position of last string in a string
Divers
Thread ID:
00754262
Message ID:
00754262
Vues:
53
I am trying to get the numeric position of a string inside a string. The string looks like this:

"CHANGE ORDER 01CHANGE ORDER 02CHANGE ORDER03"

The string to search is "CHANGE ORDER". I want to get the right most string position, which in this case should be 31, but it comes up as zero (0) when I use the following code:
lcComments = "CHANGE ORDER 01CHANGE ORDER 02CHANGE ORDER03"
lnLastStringPosition=RAT(lcComments,"CHANGE ORDER")
?lnLastStringPosition
Why this comes out as a value of 0, I do not understand.

Perhaps my 10-mile hike with my son and his SCOUT Troop this past weekend in Joshua Tree, California, has affected my mental skills.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform