Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def taskMaker(source, challengeId)
- array = Array.new
- source_length = source.length
- x = 0
- y = 0
- while (x < source_length)
- if source[x].include?("//") == false then
- array[y] = source[x]
- y = y + 1
- else
- if source[x].include?("//DB " + challengeId.to_s + "//") == true then
- string = "//DB " + challengeId.to_s + "//"
- array[y - 1] = source[x]
- array[y - 1].gsub! string, ''
- end
- end
- x = x + 1
- end
- return array
- end
Advertisement
Add Comment
Please, Sign In to add comment