New function: cw_ktv_getbstr16
FossilOrigin-Name: 0380dcb61dcb0799d19286b4edbbd6744ae56bee986fa6515fe653768a1caccf
This commit is contained in:
13
src/cw/cw_ktv_get_bstr16.c
Normal file
13
src/cw/cw_ktv_get_bstr16.c
Normal file
@ -0,0 +1,13 @@
|
||||
#include "ktv.h"
|
||||
#include "bstr.h"
|
||||
|
||||
bstr16_t cw_ktv_get_bstr16(mavl_t ktv,const char *key, bstr16_t def)
|
||||
{
|
||||
cw_KTV_t * k;
|
||||
k = cw_ktv_get(ktv,key,CW_TYPE_STR);
|
||||
if (k != NULL){
|
||||
return bstr16_create(k->type->data(k),k->type->len(k));
|
||||
}
|
||||
return def;
|
||||
}
|
||||
|
Reference in New Issue
Block a user