NVBIO
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Macros | Typedefs | Functions
kstring.c File Reference
#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.

Macros

#define __ksplit_aux
 

Typedefs

typedef unsigned char ubyte_t
 

Functions

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)
 

Macro Definition Documentation

#define __ksplit_aux
Value:
do { \
if (_offsets) { \
s[i] = 0; \
if (n == max) { \
int *tmp; \
max = max? max<<1 : 2; \
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)

Typedef Documentation

typedef unsigned char ubyte_t

Definition at line 112 of file kstring.c.

Function Documentation

void* kmemmem ( const void *  _str,
int  n,
const void *  _pat,
int  m,
int **  _prep 
)

Definition at line 155 of file kstring.c.

int ksplit_core ( char *  s,
int  delimiter,
int *  _max,
int **  _offsets 
)

Definition at line 64 of file kstring.c.

int ksprintf ( kstring_t s,
const char *  fmt,
  ... 
)

Definition at line 27 of file kstring.c.

char* kstrnstr ( const char *  str,
const char *  pat,
int  n,
int **  _prep 
)

Definition at line 181 of file kstring.c.

char* kstrstr ( const char *  str,
const char *  pat,
int **  _prep 
)

Definition at line 176 of file kstring.c.

char* kstrtok ( const char *  str,
const char *  sep,
ks_tokaux_t aux 
)

Definition at line 37 of file kstring.c.

int kvsprintf ( kstring_t s,
const char *  fmt,
va_list  ap 
)

Definition at line 8 of file kstring.c.