code: public static HString union(@NonNull Iterable<? extends HString> strings) {
        int start = Integer.MAX_VALUE;
        int end = Integer.MIN_VALUE;
        Document owner = null;
        for (HString hString : strings) {
           if (!hString.isEmpty()) {
              if (owner == null && hString.document() != null) {
                 owner = hString.document();
              } else if (hString.document() == null || owner != hString.document()) {
                 throw new IllegalArgumentException("Cannot union strings from different documents");
              }
              start = Math.min(start, hString.start());
              end = Math.max(end, hString.end());
           }
        }
        if (start < 0 || start >= end) {
           return Fragments.empty(owner);
        }
        return new Fragment(owner, start, end);
     }
docs: Creates a new string by performing a union over the spans of two or more HStrings. The new HString will have a
  span that starts at the minimum starting position of the given strings and end at the maximum ending position of
  the given strings.
  
  @param strings the HStrings to union
  @return A new HString representing the union over the spans of the given HStrings.