#include <stdarg.h>
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include <stdint.h>
#include "htslib/kstring.h"
Go to the source code of this file.
|
int | kvsprintf (kstring_t *s, const char *fmt, va_list ap) |
|
int | ksprintf (kstring_t *s, const char *fmt,...) |
|
char * | kstrtok (const char *str, const char *sep, ks_tokaux_t *aux) |
|
int | ksplit_core (char *s, int delimiter, int *_max, int **_offsets) |
|
void * | kmemmem (const void *_str, int n, const void *_pat, int m, int **_prep) |
|
char * | kstrstr (const char *str, const char *pat, int **_prep) |
|
char * | kstrnstr (const char *str, const char *pat, int n, int **_prep) |
|
Value:do { \
if (_offsets) { \
s[i] = 0; \
int *tmp; \
if ((tmp = (
int*)realloc(offsets,
sizeof(
int) *
max))) { \
offsets = tmp; \
} else { \
free(offsets); \
*_offsets = NULL; \
return 0; \
} \
} \
offsets[n++] = last_start; \
} else ++n; \
} while (0)
void* kmemmem |
( |
const void * |
_str, |
|
|
int |
n, |
|
|
const void * |
_pat, |
|
|
int |
m, |
|
|
int ** |
_prep |
|
) |
| |
int ksplit_core |
( |
char * |
s, |
|
|
int |
delimiter, |
|
|
int * |
_max, |
|
|
int ** |
_offsets |
|
) |
| |
char* kstrnstr |
( |
const char * |
str, |
|
|
const char * |
pat, |
|
|
int |
n, |
|
|
int ** |
_prep |
|
) |
| |
char* kstrstr |
( |
const char * |
str, |
|
|
const char * |
pat, |
|
|
int ** |
_prep |
|
) |
| |