summaryrefslogblamecommitdiffstats
path: root/bstrlen.c
blob: 61825d51fedc8b1365f87a30d2afe222f984dfb1 (plain) (tree)
1
2
3
4
5
6
7
8







                                                          
#include <string.h>
#include "bstr.h"
#include "uint32.h"
#include "str.h"

size_t bstrlen(const char* a) {
  if (*a) return str_len(a); else return uint32_read(a+1);
}