Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions lib/foobara/util/array.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,15 @@ def all_blank_or_false?(array)
)
end
end

def _start_with?(large_array, small_array)
return false unless large_array.size > small_array.size

small_array.each.with_index do |item, index|
return false unless large_array[index] == item
end

true
end
end
end