Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
String manipulation
Message
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00359517
Message ID:
00359539
Views:
12
Hi Larry,

Thanks a lot for your response. The code seems to work (I haven't tested yet, because I switched to another application).

Now I have another problem:
This is the code from DE. After getfile I want to know, which database belongs opened table and SET DATABASE to this DBC.

IOW, is it possible to determine database by table's name?
********************************************************************
*  Description.......: DE.BeforeOpenTables
*  Calling Samples...:
*  Parameter List....:
*  Created by........: Nadya Nosonovsky
*  Modified by.......: Nadya Nosonovsky 04/06/2000 01:50:18 PM
********************************************************************
set talk off
local cFileName
if type('pcTable')='C' and !empty(pcTable) && pcTable was choosen properly
   cFileName=pcTable
   if type('pcDBC')='C'and !empty(pcDBC)
      set database to (pcDBC)
   endif   
else
   cFileName=getfile('DBF', '', '', 0, 'Select Table to operate')  
endif   
if !empty(cFileName)    
	set multilocks on
	use (cFileName) again alias Lender in 0 shared
	=cursorsetprop("Buffering",5)
	this.InitialSelectedAlias='Lender'
endif
>>
>>I understand, that this question should have a simple answer, but I stuck :( Could somebody help me?
>>
>>The problem is:
>>
>>I have a string, say,
>>myString='Nadya, are you totally lost??!!! : <>>>>>'
>>
>>I have several symbols, like:
>>symbols=[:;./\<>+=-}]()#*]
>>
>>I want to surround these symbols with space(1)+symbol+space(1), for each occurance of these symbols in my string.
>>
>>How can I do that?
>Try the following:
>
for lxx = 1 to len(symbols)
>   myString = strtran(myString,substr(symbols,lxx,1),space(1)+substr(symbols,lxx,1)+space(1))
>endfor
>I haven't tested this so you may need to work with it a bit.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform