// Path: types/src/main/java/com/google/common/html/types/BuilderUtils.java
// static String coerceToInterchangeValid(String text) {
//     // MOE elided code that uses a non-public library to make sure text only
//     // contains minimally-encoded Unicode scalar values that can appear in
//     // both HTML and XML.
//     return text;
// 
//  }
// 
// Path: types/src/main/java/com/google/common/html/types/BuilderUtils.java
// static String escapeHtmlInternal(String s) {
//   return HTML_ESCAPER.escape(s);
// 
// }


import static com.google.common.html.types.BuilderUtils.coerceToInterchangeValid;
import static com.google.common.html.types.BuilderUtils.escapeHtmlInternal;
import com.google.common.annotations.GwtCompatible;
import com.google.common.base.Preconditions;
import java.util.Arrays;
import javax.annotation.CheckReturnValue;
   * Creates a new SafeHtml which contains, in order, the string representations of the given
   * {@code htmls}.
   */
  public static SafeHtml concat(SafeHtml... htmls) {
    return concat(Arrays.asList(htmls));
  }

  /**
   * Creates a new SafeHtml which contains, in order, the string representations of the given
   * {@code htmls}.
   */
  public static SafeHtml concat(Iterable<SafeHtml> htmls) {
    int concatLength = 0;
    for (SafeHtml html : htmls) {
      concatLength += html.getSafeHtmlString().length();
    }

    StringBuilder result = new StringBuilder(concatLength);
    for (SafeHtml html : htmls) {
      result.append(html.getSafeHtmlString());
    }
    return create(result.toString());
  }

  // Default visibility for use by SafeHtmlBuilder.
  static SafeHtml create(String html) {
    return new SafeHtml(html);
  }

  private static String htmlEscapeInternal(String text) {
// Path: types/src/main/java/com/google/common/html/types/BuilderUtils.java
// static String coerceToInterchangeValid(String text) {
//     // MOE elided code that uses a non-public library to make sure text only
//     // contains minimally-encoded Unicode scalar values that can appear in
//     // both HTML and XML.
//     return text;
// 
//  }
// 
// Path: types/src/main/java/com/google/common/html/types/BuilderUtils.java
// static String escapeHtmlInternal(String s) {
//   return HTML_ESCAPER.escape(s);
// 
// }


// Path: types/src/main/java/com/google/common/html/types/SafeHtmls.java
import static com.google.common.html.types.BuilderUtils.coerceToInterchangeValid;
import static com.google.common.html.types.BuilderUtils.escapeHtmlInternal;
import com.google.common.annotations.GwtCompatible;
import com.google.common.base.Preconditions;
import java.util.Arrays;
import javax.annotation.CheckReturnValue;

   * Creates a new SafeHtml which contains, in order, the string representations of the given
   * {@code htmls}.
   */
  public static SafeHtml concat(SafeHtml... htmls) {
    return concat(Arrays.asList(htmls));
  }

  /**
   * Creates a new SafeHtml which contains, in order, the string representations of the given
   * {@code htmls}.
   */
  public static SafeHtml concat(Iterable<SafeHtml> htmls) {
    int concatLength = 0;
    for (SafeHtml html : htmls) {
      concatLength += html.getSafeHtmlString().length();
    }

    StringBuilder result = new StringBuilder(concatLength);
    for (SafeHtml html : htmls) {
      result.append(html.getSafeHtmlString());
    }
    return create(result.toString());
  }

  // Default visibility for use by SafeHtmlBuilder.
  static SafeHtml create(String html) {
    return new SafeHtml(html);
  }

  private static String htmlEscapeInternal(String text) {
    return escapeHtmlInternal(coerceToInterchangeValid(text));