Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Check length of character string
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01512090
Message ID:
01512178
Vues:
81
actually i am testing a table so len(Lname) simply gives me the length of the field in the table each time - that was my problem.
k
>>thanks viv - sometimes you just have to learn to think like a computer
>>k
>>
>>>>sorry a quicky question here.
>>>>I have been persuing help and can't seem to find reference for this
>>>>how do i check the character length within a field length
>>>>
>>>>lname is a field 30 characters
>>>>the name 'smith' is 5 characters
>>>>i am trying to get 5 as the response.
>>>>
>>>>? len(Lname)  &&& give me the length of the field not the contents.
>>>>
>>>
len(trim(lname))
?
>
>There is this:
>len(lname) ...which will give you the number of characters.
>
>If you do this:
>len(alltrim(lname)) it excludes the beginning and ending spaces...so..
>
>lname = "me "
>
>len(lname) = 3
>len(alltrim(lname)) = 2
>
>...works the same if the spaces are at the front too...so
>
>lname = " me "
>len(lname) = 4
>len(alltrim(lname)) = 2
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform