|
-
Jul 16th, 2000, 01:28 AM
#1
Thread Starter
Fanatic Member
if a file had these in it
1.AAA
2.BBB
3.CCC
and i wanted to get rid of the CCC but keep the 3. what would be the fastest way?
I always make slow code for this using arrays
[b]Dim Index(5000) as string
Dim indexControl as integer
indexcontrol = 0
then i read the chunk input #1, a$
and then do a
for i = 1 to len(a$)
if the code finds the chunk it rewrites it by loading it into the array and killing the file.
Is there a better way? I was thinking of binary replacing the string with chr32.
?
ok, so... windows takes 1 minute to search for a file on my PC yet google.com takes 1 second to search the entire internet? 
-
Jul 16th, 2000, 01:37 AM
#2
Fanatic Member
Hmm...the only way i can think of at the moment is by loading the file to a hidden textbox and deleteing evering after 2 untill it reaches 3. I hope that makes sense...i'll try to get the code whiped up, but most likely someone will beat me to it.
Gl,
D!m
PS. i;m not sure if it will work in your case...but you can try splitting the text file and then combining only Append only needed parts. So in this case, split 1. into one text box 2. into another and 3 in a another then combine 1&3. But this would take more code then using your array.
Oh! forget it then, since you don;t like textboxes... 
[Edited by Dim on 07-16-2000 at 02:42 AM]
-
Jul 16th, 2000, 01:40 AM
#3
Thread Starter
Fanatic Member
Wow thanks for speedy reply. Its a good idea but i dont really want to involve text boxes since its a bit to messy and i like to make my things without using labels and such.
Im going to try the character 32 replacment right now. Or character 0 but thats usually used in binary files.
Any other ideas anyone?
Thanks in advance
ok, so... windows takes 1 minute to search for a file on my PC yet google.com takes 1 second to search the entire internet? 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|