cook_component (Irc::NetmaskDb)

    # File lib/rbot/maskdb.rb, line 105
        def cook_component(str)
          s = (str && !str.empty?) ? str : '*'
          l = s.index(/[\?\*]/)
          if l
            l2 = s.size - s.rindex(/[\?\*]/) - 1
            if l2 > l
              s = s.reverse
              l = l2
            end

            return (l > 0) ? s.slice(0 .. (l - 1)) : ''
          else
            return s
          end
        end