17 lines
303 B
C
17 lines
303 B
C
#include "bstr.h"
|
|
#include <libowfat/uint32.h>
|
|
|
|
const char* bstrfirst(const char* a) {
|
|
if (*a) return a; else return a+5;
|
|
}
|
|
|
|
#ifdef UNITTEST
|
|
#include <assert.h>
|
|
|
|
int main() {
|
|
const char* s;
|
|
s="foo"; assert(bstrfirst(s) == s);
|
|
s="\x00\x03\x00\x00\x00""foo"; assert(bstrfirst(s) == s+5);
|
|
}
|
|
#endif
|