string.c File Reference

#include <config.h>
#include <ctype.h>
#include <isc/mem.h>
#include <isc/print.h>
#include <isc/region.h>
#include <isc/string.h>
#include <isc/util.h>

Go to the source code of this file.

Functions

isc_uint64_t isc_string_touint64 (char *source, char **end, int base)
 Convert the string pointed to by 'source' to isc_uint64_t.
isc_result_t isc_string_copy (char *target, size_t size, const char *source)
void isc_string_copy_truncate (char *target, size_t size, const char *source)
isc_result_t isc_string_append (char *target, size_t size, const char *source)
void isc_string_append_truncate (char *target, size_t size, const char *source)
isc_result_t isc_string_printf (char *target, size_t size, const char *format,...)
void isc_string_printf_truncate (char *target, size_t size, const char *format,...)
char * isc_string_regiondup (isc_mem_t *mctx, const isc_region_t *source)
char * isc_string_separate (char **stringp, const char *delim)
size_t isc_string_strlcpy (char *dst, const char *src, size_t size)
size_t isc_string_strlcat (char *dst, const char *src, size_t size)
char * isc_string_strcasestr (const char *str, const char *search)

Variables

static char digits [] = "0123456789abcdefghijklmnoprstuvwxyz"


Detailed Description

Definition in file string.c.


Function Documentation

isc_uint64_t isc_string_touint64 ( char *  source,
char **  endp,
int  base 
)

Convert the string pointed to by 'source' to isc_uint64_t.

On successful conversion 'endp' points to the first character after conversion is complete.

'base': 0 or 2..36

If base is 0 the base is computed from the string type.

On error 'endp' points to 'source'.

Definition at line 62 of file string.c.

References digits, and s.

Referenced by fromtext_any_tsig(), isc_netscope_pton(), and parse_unitstring().

isc_result_t isc_string_copy ( char *  target,
size_t  size,
const char *  source 
)

Definition at line 126 of file string.c.

References ENSURE, ISC_R_NOSPACE, ISC_R_SUCCESS, ISC_STRING_MAGIC, and REQUIRE.

void isc_string_copy_truncate ( char *  target,
size_t  size,
const char *  source 
)

Definition at line 140 of file string.c.

References ENSURE, and REQUIRE.

isc_result_t isc_string_append ( char *  target,
size_t  size,
const char *  source 
)

Definition at line 149 of file string.c.

References ENSURE, ISC_R_NOSPACE, ISC_R_SUCCESS, ISC_STRING_MAGIC, and REQUIRE.

void isc_string_append_truncate ( char *  target,
size_t  size,
const char *  source 
)

Definition at line 164 of file string.c.

References ENSURE, and REQUIRE.

isc_result_t isc_string_printf ( char *  target,
size_t  size,
const char *  format,
  ... 
)

Definition at line 174 of file string.c.

References ENSURE, ISC_R_NOSPACE, ISC_R_SUCCESS, ISC_STRING_MAGIC, and REQUIRE.

void isc_string_printf_truncate ( char *  target,
size_t  size,
const char *  format,
  ... 
)

Definition at line 195 of file string.c.

References ENSURE, and REQUIRE.

char* isc_string_regiondup ( isc_mem_t mctx,
const isc_region_t source 
)

Definition at line 210 of file string.c.

References isc_region::base, isc_mem_allocate, isc_region::length, and REQUIRE.

char* isc_string_separate ( char **  stringp,
const char *  delim 
)

Definition at line 226 of file string.c.

References s.

size_t isc_string_strlcpy ( char *  dst,
const char *  src,
size_t  size 
)

Definition at line 247 of file string.c.

References s.

size_t isc_string_strlcat ( char *  dst,
const char *  src,
size_t  size 
)

Definition at line 273 of file string.c.

References s.

char* isc_string_strcasestr ( const char *  str,
const char *  search 
)

Definition at line 301 of file string.c.

References DE_CONST, and s.


Variable Documentation

char digits[] = "0123456789abcdefghijklmnoprstuvwxyz" [static]

Definition at line 59 of file string.c.

Referenced by dns_name_fromtext(), fromtext_in_nsap(), inet_pton4(), and isc_string_touint64().


Generated on Tue Apr 28 17:41:18 2015 by Doxygen 1.5.4 for BIND9 Internals 9.11.0pre-alpha