# File jabber4r/jid.rb, line 35

    def initialize(id)

      at_loc = id.index('@')

      slash_loc = id.index('/')

      if at_loc.nil? and slash_loc.nil?

        @host = id

      end

      if at_loc

        @node = id[0,at_loc]

        host_end = slash_loc ? slash_loc-(at_loc+1) : id.size-(at_loc+1)

        @host = id[at_loc+1,host_end]

        @resource = id[slash_loc+1, id.size] if slash_loc

      end

    end