Method: Csvlint::Csvw::Column.languages_match

Defined in:
lib/csvlint/csvw/column.rb

.languages_match(l1, l2) ⇒ Object



140
141
142
143
144
# File 'lib/csvlint/csvw/column.rb', line 140

def languages_match(l1, l2)
  return true if l1 == l2 || l1 == "und" || l2 == "und"
  return true if l1 =~ Regexp.new("^#{l2}-") || l2 =~ Regexp.new("^#{l1}-")
  false
end