2 ms·Be careful, this does not work if buf is 'char*' rather than an array type.by loeg 3y agoBe careful, this does not work if buf is 'char*' rather than an array type.