Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strip control characters from string
Message
De
11/07/2007 09:21:41
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
11/07/2007 09:14:37
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:
01239214
Message ID:
01239223
Vues:
15
This message has been marked as the solution to the initial question of the thread.
>It does when you view the final text file in notepad after using StrToFile. If you know how to strip the control characters from a string, just tell me.
>
>>It's not clear what the problem is. FILETOSTR() loads file into a memory variable. It doesn't display anything.
>>
>>>There is a line-break control character that is displaying when I use FileToStr and StrToFile functions. This starts with a text file from a 3rd party, so I have no control over the break being in there. I prefer it actually, but when I use FileToStr, it displays the control character rather than breaking the line. Again, that's ok, but I don't want it in my final results. How can I strip it out? It won't display in the snip below, but see the "[HERE]" for where it is showing up. Thanks!
>>>
>>
>>>MSH|^~\&|Medinotes|CP|External||20070705154008||DFT^P03|468D4AD320F3|P|2.4|||AL|||[HERE]EVN|P03|20070705154008|20070705154008[HERE]PID

Jay,
Stripping is the easy part but I didn't understand teh problem either.
lcCharsToStrip = ''
for ix = 0 to 31
  lcCharsToStrip = m.lcCharsToStrip + chr(m.ix)
endfor

lcResult = chrtran( m.myVar, m.lcCharsToStrip, '')
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform