private static String escape(final String content, final char quoteChar) {
    final StringBuilder output = new StringBuilder(content.length());
    for (int i = 0; i < content.length(); ++i) {
      final char c = content.charAt(i);
      if (c == quoteChar || c == '\\') {
        output.append(Tokens.ESCAPE_MARKER);
      }
      output.append(c);
    }
    return output.toString();
  }
Whether a {@link Tokens#VALUE_SEPARATOR} needs to be printed before the beginning of the next object.
nbt/src/main/java/net/kyori/adventure/nbt/TagStringWriter.java