code: public static Name removeSegment(Name name, byte marker) {
      return isSegmented(name, marker) ? name.getPrefix(-1) : new Name(name);
    }
docs: Remove a segment component from the end of a name
  
  @param name the name of a packet
  @param marker the marker type (the initial byte of the component)
  @return the new name with the segment component removed or a copy of the name if no segment component was present