~
Advanced Hosters -

sydoow
V.I.P.
: 29.06.2007
: 8215
# : 26, 2008 2:42 am
:
:
2



:







: "" .
, ?

GetLucky
: 08.08.2008
: 14
# : 26, 2008 11:01 am
Ruby Smile
http://rubyforge.org/frs/download.php/29263/ruby186-26.exe
subs .
text.txt -
words.txt -
, .
result.txt

soft.rb
:

subs = "" #
words = IO.readlines("words.txt")
text = IO.read("text.txt")
resultFile = File.open("result.txt", "w")
charIndex = 0
wordIndex = 0
while charIndex < text.length
  if text[charIndex,subs.length] == subs
    if wordIndex >= words.length
      wordIndex = 0
    end
    text[charIndex,subs.length] = words[wordIndex].chomp
    wordIndex = wordIndex + 1
  end
  charIndex = charIndex + 1
end
resultFile.print(text)
resultFile.close


sydoow
V.I.P.
: 29.06.2007
: 8215
# : 26, 2008 4:15 pm
! Smile

GetLucky
: 08.08.2008
: 14
# : 26, 2008 5:39 pm
sydoow, Drinks or Beer !
, "" , . :
:

subs = "" #
words = IO.readlines("words.txt")
text = IO.read("text.txt")
resultText = ""
resultFile = File.open("result.txt", "w")
charIndex = 0
wordIndex = 0
while charIndex < text.length
  if text[charIndex,subs.length] == subs
    if wordIndex >= words.length
      wordIndex = 0
    end
    resultText = resultText + words[wordIndex].chomp
    wordIndex = wordIndex + 1
    charIndex = charIndex + subs.length
  else
    resultText = resultText + text[charIndex,1]
    charIndex = charIndex + 1
  end
end
resultFile.print(resultText)
resultFile.close


"" .

pepper
: 10.04.2008
: 184
# : 26, 2008 6:26 pm
TextPipe .

sydoow
V.I.P.
: 29.06.2007
: 8215
# : 26, 2008 10:15 pm
GetLucky, ?
Ruby, , , , ? )

sydoow
V.I.P.
: 29.06.2007
: 8215
# : 26, 2008 10:32 pm
!! SmileSmileSmile

, "*.rb" Wink

, , )

GetLucky
: 08.08.2008
: 14
# : 26, 2008 10:40 pm
Ruby .rb , .
, soft.rb ( , rb ) . .
text.txt ( ) words.txt ( ) . . soft.rb result.txt ( , ).
, .

Upd. Smile
    ~