# File lib/transliteration/simple.rb, line 36
  def self.translify(str)
    chars = str.split(//)    
    
    lowers = TABLE_LOWER.map{|e| e[0] }
    uppers = TABLE_UPPER.map{|e| e[0] }
    
    hashtable = {}
    TABLE.each do | item |
      next unless item[0] && item[1]
      hashtable[item[0]] = item[1]
    end
    
    result = ''
    chars.each_with_index do | char, index |
      if uppers.include?(char) && lowers.include?(chars[index+1])
        # Combined case. Here we deal with Latin letters so there is no problem to use
        # Ruby's builtin upcase_downcase
        ch = hashtable[char].downcase.capitalize
        result << ch
      elsif uppers.include?(char)
        result << hashtable[char]        
      elsif lowers.include?(char)
        result << hashtable[char]
      else
        result << char
      end
    end
    return result
  end