Groonga 3.0.9 Source Code Document
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Structures | Macros | Enumerations | Functions | Variables
str.h File Reference
#include "groonga_in.h"
#include <groonga/nfkc.h>
#include <stdio.h>
Include dependency graph for str.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  grn_str_getopt_opt

Macros

#define GRN_STR_BLANK   0x80
#define GRN_STR_ISBLANK(c)   (c & 0x80)
#define GRN_STR_CTYPE(c)   (c & 0x7f)
#define GRN_BULK_INCR_LEN(buf, len)
#define GRN_BULK_SET_CURR(buf, p)
#define GRN_TOK_VOID   (0x00)
#define GRN_TOK_SYMBOL   (0x01)
#define GRN_TOK_STRING   (0x02)
#define GRN_TOK_QUOTE   (0x03)
#define GRN_OBJ_FORMAT_XML_ELEMENT_MASK   (0x01<<1)
#define GRN_OBJ_FORMAT_XML_ELEMENT_RESULTSET   (0x00<<1)
#define GRN_OBJ_FORMAT_XML_ELEMENT_NAVIGATIONENTRY   (0x01<<1)

Enumerations

enum  grn_str_getopt_op { GETOPT_OP_NONE = 0, GETOPT_OP_ON, GETOPT_OP_OFF, GETOPT_OP_UPDATE }

Functions

GRN_API size_t grn_str_len (grn_ctx *ctx, const char *str, grn_encoding encoding, const char **last)
GRN_API int grn_isspace (const char *s, grn_encoding encoding)
int8_t grn_atoi8 (const char *nptr, const char *end, const char **rest)
uint8_t grn_atoui8 (const char *nptr, const char *end, const char **rest)
int16_t grn_atoi16 (const char *nptr, const char *end, const char **rest)
uint16_t grn_atoui16 (const char *nptr, const char *end, const char **rest)
GRN_API int grn_atoi (const char *nptr, const char *end, const char **rest)
GRN_API unsigned int grn_atoui (const char *nptr, const char *end, const char **rest)
unsigned int grn_htoui (const char *nptr, const char *end, const char **rest)
GRN_API int64_t grn_atoll (const char *nptr, const char *end, const char **rest)
grn_rc grn_itoa (int i, char *p, char *end, char **rest)
grn_rc grn_lltoa (int64_t i, char *p, char *end, char **rest)
grn_rc grn_ulltoa (uint64_t i, char *p, char *end, char **rest)
GRN_API grn_rc grn_aton (grn_ctx *ctx, const char *p, const char *end, const char **rest, grn_obj *res)
GRN_API void grn_itoh (unsigned int i, char *p, unsigned int len)
int grn_str_tok (const char *str, size_t str_len, char delim, const char **tokbuf, int buf_size, const char **rest)
GRN_API int grn_str_getopt (int argc, char *const argv[], const grn_str_getopt_opt *opts, int *flags)
char * grn_itob (grn_id id, char *p)
grn_id grn_btoi (char *b)
grn_rc grn_substring (grn_ctx *ctx, char **str, char **str_end, int start, int end, grn_encoding encoding)
GRN_API int grn_charlen_ (grn_ctx *ctx, const char *str, const char *end, grn_encoding encoding)
GRN_API grn_strgrn_str_open_ (grn_ctx *ctx, const char *str, unsigned int str_len, int flags, grn_encoding encoding)
grn_rc grn_text_ulltoa (grn_ctx *ctx, grn_obj *buf, unsigned long long int i)
GRN_API const char * grn_text_cgidec (grn_ctx *ctx, grn_obj *buf, const char *p, const char *e, const char *delimiters)
GRN_API const char * grn_text_unesc_tok (grn_ctx *ctx, grn_obj *buf, const char *p, const char *e, char *tok_type)
GRN_API void grn_str_url_path_normalize (grn_ctx *ctx, const char *path, size_t path_len, char *buf, size_t buf_len)
GRN_API grn_rc grn_text_fgets (grn_ctx *ctx, grn_obj *buf, FILE *fp)
grn_bool grn_bulk_is_zero (grn_ctx *ctx, grn_obj *obj)

Variables

int grn_str_margin_size

Macro Definition Documentation

#define GRN_BULK_INCR_LEN (   buf,
  len 
)
Value:
do {\
if (GRN_BULK_OUTP(buf)) {\
(buf)->u.b.curr += (len);\
} else {\
(buf)->header.flags += (len);\
}\
} while (0)

Definition at line 81 of file str.h.

#define GRN_BULK_SET_CURR (   buf,
 
)
Value:
do {\
if (GRN_BULK_OUTP(buf)) {\
(buf)->u.b.curr = (char *)(p);\
} else {\
(buf)->header.flags = (char *)(p) - GRN_BULK_HEAD(buf);\
}\
} while (0)

Definition at line 89 of file str.h.

#define GRN_OBJ_FORMAT_XML_ELEMENT_MASK   (0x01<<1)

Definition at line 116 of file str.h.

#define GRN_OBJ_FORMAT_XML_ELEMENT_NAVIGATIONENTRY   (0x01<<1)

Definition at line 118 of file str.h.

#define GRN_OBJ_FORMAT_XML_ELEMENT_RESULTSET   (0x00<<1)

Definition at line 117 of file str.h.

#define GRN_STR_BLANK   0x80

Definition at line 49 of file str.h.

#define GRN_STR_CTYPE (   c)    (c & 0x7f)

Definition at line 51 of file str.h.

#define GRN_STR_ISBLANK (   c)    (c & 0x80)

Definition at line 50 of file str.h.

#define GRN_TOK_QUOTE   (0x03)

Definition at line 106 of file str.h.

#define GRN_TOK_STRING   (0x02)

Definition at line 105 of file str.h.

#define GRN_TOK_SYMBOL   (0x01)

Definition at line 104 of file str.h.

#define GRN_TOK_VOID   (0x00)

Definition at line 103 of file str.h.

Enumeration Type Documentation

Enumerator:
GETOPT_OP_NONE 
GETOPT_OP_ON 
GETOPT_OP_OFF 
GETOPT_OP_UPDATE 

Definition at line 32 of file str.h.

Function Documentation

GRN_API int grn_atoi ( const char *  nptr,
const char *  end,
const char **  rest 
)

Definition at line 1432 of file str.c.

Here is the caller graph for this function:

int16_t grn_atoi16 ( const char *  nptr,
const char *  end,
const char **  rest 
)

Definition at line 1397 of file str.c.

Here is the caller graph for this function:

int8_t grn_atoi8 ( const char *  nptr,
const char *  end,
const char **  rest 
)

Definition at line 1362 of file str.c.

Here is the caller graph for this function:

GRN_API int64_t grn_atoll ( const char *  nptr,
const char *  end,
const char **  rest 
)

Definition at line 1467 of file str.c.

Here is the caller graph for this function:

GRN_API grn_rc grn_aton ( grn_ctx ctx,
const char *  p,
const char *  end,
const char **  rest,
grn_obj res 
)

Definition at line 1724 of file str.c.

Here is the call graph for this function:

Here is the caller graph for this function:

GRN_API unsigned int grn_atoui ( const char *  nptr,
const char *  end,
const char **  rest 
)

Definition at line 1453 of file str.c.

Here is the caller graph for this function:

uint16_t grn_atoui16 ( const char *  nptr,
const char *  end,
const char **  rest 
)

Definition at line 1418 of file str.c.

Here is the caller graph for this function:

uint8_t grn_atoui8 ( const char *  nptr,
const char *  end,
const char **  rest 
)

Definition at line 1383 of file str.c.

Here is the caller graph for this function:

grn_id grn_btoi ( char *  b)

Definition at line 1667 of file str.c.

grn_bool grn_bulk_is_zero ( grn_ctx ctx,
grn_obj obj 
)

Definition at line 3101 of file str.c.

Here is the caller graph for this function:

GRN_API int grn_charlen_ ( grn_ctx ctx,
const char *  str,
const char *  end,
grn_encoding  encoding 
)

Definition at line 130 of file str.c.

Here is the caller graph for this function:

unsigned int grn_htoui ( const char *  nptr,
const char *  end,
const char **  rest 
)

Definition at line 1490 of file str.c.

Here is the caller graph for this function:

GRN_API int grn_isspace ( const char *  s,
grn_encoding  encoding 
)

Definition at line 1334 of file str.c.

grn_rc grn_itoa ( int  i,
char *  p,
char *  end,
char **  rest 
)

Definition at line 1546 of file str.c.

Here is the caller graph for this function:

char* grn_itob ( grn_id  id,
char *  p 
)

Definition at line 1655 of file str.c.

Here is the caller graph for this function:

GRN_API void grn_itoh ( unsigned int  i,
char *  p,
unsigned int  len 
)

Definition at line 1535 of file str.c.

Here is the caller graph for this function:

grn_rc grn_lltoa ( int64_t  i,
char *  p,
char *  end,
char **  rest 
)

Definition at line 1600 of file str.c.

Here is the caller graph for this function:

GRN_API int grn_str_getopt ( int  argc,
char *const  argv[],
const grn_str_getopt_opt opts,
int *  flags 
)

Definition at line 1829 of file str.c.

Here is the caller graph for this function:

GRN_API size_t grn_str_len ( grn_ctx ctx,
const char *  str,
grn_encoding  encoding,
const char **  last 
)

Definition at line 1318 of file str.c.

Here is the call graph for this function:

Here is the caller graph for this function:

GRN_API grn_str* grn_str_open_ ( grn_ctx ctx,
const char *  str,
unsigned int  str_len,
int  flags,
grn_encoding  encoding 
)

Definition at line 1211 of file str.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int grn_str_tok ( const char *  str,
size_t  str_len,
char  delim,
const char **  tokbuf,
int  buf_size,
const char **  rest 
)

Definition at line 1776 of file str.c.

Here is the caller graph for this function:

GRN_API void grn_str_url_path_normalize ( grn_ctx ctx,
const char *  path,
size_t  path_len,
char *  buf,
size_t  buf_len 
)

Definition at line 3043 of file str.c.

Here is the caller graph for this function:

grn_rc grn_substring ( grn_ctx ctx,
char **  str,
char **  str_end,
int  start,
int  end,
grn_encoding  encoding 
)

Definition at line 2484 of file str.c.

Here is the call graph for this function:

GRN_API const char* grn_text_cgidec ( grn_ctx ctx,
grn_obj buf,
const char *  p,
const char *  e,
const char *  delimiters 
)

Definition at line 3003 of file str.c.

Here is the call graph for this function:

Here is the caller graph for this function:

GRN_API grn_rc grn_text_fgets ( grn_ctx ctx,
grn_obj buf,
FILE *  fp 
)

Definition at line 3085 of file str.c.

Here is the call graph for this function:

grn_rc grn_text_ulltoa ( grn_ctx ctx,
grn_obj buf,
unsigned long long int  i 
)

Definition at line 2051 of file str.c.

Here is the call graph for this function:

Here is the caller graph for this function:

GRN_API const char* grn_text_unesc_tok ( grn_ctx ctx,
grn_obj buf,
const char *  p,
const char *  e,
char *  tok_type 
)

Definition at line 2273 of file str.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_ulltoa ( uint64_t  i,
char *  p,
char *  end,
char **  rest 
)

Definition at line 1628 of file str.c.

Here is the caller graph for this function:

Variable Documentation

int grn_str_margin_size