Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ALLTRIM not trimming
Message
 
 
À
21/01/2010 09:18:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01445103
Message ID:
01445189
Vues:
32
>>>It is ASCii 160. how to get rid of it? I tried STRTRAN() with TRIM() but it did not fix it.
>>>
>>>Ooops. yes it worked. REPLACE field WITH alltRIM(STRTRAN(field,chr(160),""))
>>
>>ALLTRIM in VFP9 has additional parameter (trim character).
>>
>>But it doesn't work with char(160) as parsing character and I don't see anything regarding this in Help.
>
>I just tried it in VFP 9 SP02 with the hotfixes applied and it works fine; try this:
>
>
>lcTest = "Test" + CHR(160)
>?IIF(RIGHT(lcTest,1)=CHR(160),.T.,.F.)    && Returns True
>lcTest = ALLTRIM(lcTest,1,CHR(20),CHR(160))
>?IIF(RIGHT(lcTest,1)=CHR(160),.T.,.F.)   && Returns False
>
This was the test I tried yesterday (not sure about hotfixes, VFP9 SP2)
lcText = CHR(160) + "Test"
?ALLTRIM(m.lctext,1,CHR(160))
?ASC(lcText)
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform