How can I partition a QByteArray efficiently?
问题 I want to partition a QByteArray message efficiently, so this function I implemented take the Bytes, the part I want to extract, and toEnd flag which tells if I want to extract part1 till the end of the array. my dilimeter is spcae ' ' example if I have: ba = "HELLO HOW ARE YOU?" ba1 = getPart(ba, 1, false) -> ba1 = "HELLO" ba2 = getPart(ba, 2, true) -> ba2 = "HOW ARE YOU?" ba3 = getPart(ba, 3, false) -> ba3 = "ARE" the function below works just fine, but I am wondering if this is efficient.