Did I find the right examples for you? yes no

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)
Incrementally validate a chunk of bytes provided as bytearray.

Will return a quad (valid?, endsOnCodePoint?, currentIndex, totalIndex).

As soon as an octet is encountered which renders the octet sequence
invalid, a quad with valid? == False is returned. currentIndex returns
the index within the currently consumed chunk, and totalIndex the
index within the total consumed sequence that was the point of bail out.
When valid? == True, currentIndex will be len(ba) and totalIndex the
total amount of consumed bytes.

src/w/s/wsaccel-HEAD/tests/test_4.py   wsaccel(Download)
def test_validate():
    v = wsaccel.utf8validator.Utf8Validator()
    x = "Hello-µ@ßöäüàá-UTF-8!!"  # taken from case 6.2.1
    assert v.validate(x) == (True, True, 29, 29)