Wire.write behavior on clock stretching

Hi guys.

I would like to know if the Wire library is full compliant with the I2C spec (https://www.nxp.com/docs/en/user-guide/UM10204.pdf).
More specifically, if it supports clock stretching as a master. Finally, I need to know Wire.write() and Wire.endTransmission() behaviour in the occurrence of a short and a long clock stretching. These are very important information that are missing in the Arduino documentation, as clock stretching is used by I2C slave devices implemented in software.

Will the function nWByte=Wire.write(data, length) exit only after is completion when transmitting multiple bytes? Even in the case of a long clock stretching (10ms) between bytes transmission? Or, will it exit with nWByte < length?

If nWByte < length can happen due to clock stretching, what is Wire.endTransmission() behaviour in this case? Will it issue an error?


i've had problems where wire hangs because I believe it doesn't timeout due to a lack of acknowledgement