11#ifndef TOR_UTIL_STRING_H
12#define TOR_UTIL_STRING_H
19const void *
tor_memmem(
const void *haystack,
size_t hlen,
const void *needle,
21const void *tor_memstr(
const void *haystack,
size_t hlen,
24#define fast_digest_is_zero(d) fast_mem_is_zero((d), DIGEST_LEN)
25#define fast_digetst256_is_zero(d) fast_mem_is_zero((d), DIGEST256_LEN)
31#define HEX_CHARACTERS "0123456789ABCDEFabcdef"
41int strcmpend(
const char *s1,
const char *s2);
Utility macros to handle different features and behavior in different compilers.
int tor_strisspace(const char *s)
const char * find_whitespace_eos(const char *s, const char *eos)
int strcasecmpstart(const char *s1, const char *s2)
void tor_strlower(char *s)
int strcmpstart(const char *s1, const char *s2)
int strcmpend(const char *s1, const char *s2)
const char * find_whitespace(const char *s)
void tor_strupper(char *s)
const char * eat_whitespace_eos(const char *s, const char *eos)
int fast_memcmpstart(const void *mem, size_t memlen, const char *prefix)
int strcasecmpend(const char *s1, const char *s2)
int tor_strisprint(const char *s)
int strcmp_opt(const char *s1, const char *s2)
int string_is_utf8_no_bom(const char *str, size_t len)
int tor_digest256_is_zero(const char *digest)
int fast_mem_is_zero(const char *mem, size_t len)
int string_is_C_identifier(const char *string)
void tor_strstrip(char *s, const char *strip)
const char * find_str_at_start_of_line(const char *haystack, const char *needle)
const char * eat_whitespace(const char *s)
const void * tor_memmem(const void *haystack, size_t hlen, const void *needle, size_t nlen)
const char * eat_whitespace_eos_no_nl(const char *s, const char *eos)
const char * eat_whitespace_no_nl(const char *s)
int tor_strisnonupper(const char *s)
int string_is_utf8(const char *str, size_t len)
int tor_digest_is_zero(const char *digest)
void tor_strreplacechar(char *s, char find, char replacement)