New function: cw_ktv_getbstr16

FossilOrigin-Name: 0380dcb61dcb0799d19286b4edbbd6744ae56bee986fa6515fe653768a1caccf
This commit is contained in:
7u83@mail.ru
2018-04-04 07:25:16 +00:00
parent 1f630cfe3d
commit c7d778a958
3 changed files with 16 additions and 1 deletions

View 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;
}