First page
Back
Continue
Last page
Overview
Graphics
Efter assert
#include <string.h>
#include <assert.h>
size_t q2_len(
const
char
*s) {
const
char
*p = strchr(s,'q');
if
(p)
p=strchr(p+1,'q');
if
(!p) {
p=strchr(s,'\0');
assert(p);
}
return
p-s;
}