a question about functions *updated

a question about functions *updated

hello, this is my codes: http://tinypaste.com/2c67e
and this is my other code: http://tinypaste.com/4fdc74
i want to make equal txt variable (in first link line 3) and fileString variable (in second link line 2). how can i unify this codes?
note: sorry my bad english