Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Put a specific symbol after each word.

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    Cheat Engine Forum Index -> General Discussions
View previous topic :: View next topic  
Author Message
Eraser
Grandmaster Cheater
Reputation: 0

Joined: 23 Jul 2008
Posts: 504
Location: http://www.youtube.com/PCtrainers

PostPosted: Thu Jul 09, 2009 2:02 pm    Post subject: Put a specific symbol after each word. Reply with quote

I have a very big list of words, they are in this format:
tt8t8tttt
hhhjhj5jjj
hjhj58h8h8h
ghgf8gf8hhhh
ghgfh8gh8g8h
hhjg7jhgj87
hjh8j8ghj8h
ijuu4y4y4yyy
ggg4g4g4rtrtre
ghg8hgh8jj
fgfgdfgfd8g
jkhj7k8hj7k
jjj8hujk7hk
uuuu8uuu9ttt
vvvdv8dvvv
uuuu8uuu9ttt
KKKK9HJ9HH
hyh8h8hg4h
jjjimondaroks
kkkk9kkkk9uuu
ghghghg8

i need it to be in this format: tt8t8tttt;hhhjhj5jjj;hjhj58h8h8h;

any idea how to do this automatically?
Back to top
View user's profile Send private message
NothingToShow
Grandmaster Cheater Supreme
Reputation: 0

Joined: 11 Jul 2007
Posts: 1579

PostPosted: Thu Jul 09, 2009 2:07 pm    Post subject: Reply with quote

It can be done by making a program read all files into an array or list, then output them again by doing something like this:
for each line in file.txt do
String output = output + current line + ";"

That's a very basic method, but can be used.

I can try to make something in Python.

Here you go:
Code:
file = open ("fil.txt","r") //edit this to your file name. (fil.txt)
output = ""
for line in file.readlines():
   line = line.replace('\n', '') //replaces new lines
   output = output + line + ";" //just edit the ";" part to whatever symbol you want

print output

It does what you want it to.

It gives the output as:
line1;line2;line3;
Back to top
View user's profile Send private message
FullyAwesome
I post too much
Reputation: 0

Joined: 05 Apr 2007
Posts: 4438
Location: Land Down Under

PostPosted: Thu Jul 09, 2009 5:42 pm    Post subject: Reply with quote

got bored and did a little differently to GNU.

http://rapidshare.com/files/253986557/Line_Editor.exe

_________________
Back to top
View user's profile Send private message MSN Messenger
LolSalad
Grandmaster Cheater
Reputation: 1

Joined: 26 Aug 2007
Posts: 988
Location: Australia

PostPosted: Thu Jul 09, 2009 6:27 pm    Post subject: Reply with quote

You can put this in your address bar and do it from your browser.

Code:
javascript:document.innerHTML='<textarea rows="10" cols="20" id="in">Enter text here.</textarea><br/><input type="text" value="Enter delimiter here." id="delim"/><br/><input type="submit" value="Convert" onclick="javascript:var d=document.getElementById(\'delim\').value;alert(document.getElementById(\'in\').value.split(\'\\n\').join(d)+d)"/>';

_________________
Back to top
View user's profile Send private message MSN Messenger
Eraser
Grandmaster Cheater
Reputation: 0

Joined: 23 Jul 2008
Posts: 504
Location: http://www.youtube.com/PCtrainers

PostPosted: Fri Jul 10, 2009 1:05 am    Post subject: Reply with quote

FullyAwesome wrote:
got bored and did a little differently to GNU.

http://rapidshare.com/files/253986557/Line_Editor.exe


Thank you, this one worked very good.

And for python.. i didn't have it so i couldn't paste the code Sad
Back to top
View user's profile Send private message
Trucido
Moderator
Reputation: 6

Joined: 08 Sep 2007
Posts: 2792

PostPosted: Fri Jul 10, 2009 2:43 am    Post subject: Reply with quote

Seems to be answered.
_________________
I'm out.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.    Cheat Engine Forum Index -> General Discussions All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites