tor  0.4.2.0-alpha-dev
Functions
compat_string.c File Reference
#include "lib/string/compat_string.h"
#include "lib/err/torerr.h"
#include "ext/strlcpy.c"
#include "ext/strlcat.c"
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Functions

static char * strtok_helper (char *cp, const char *sep)
 
char * tor_strtok_r_impl (char *str, const char *sep, char **lasts)
 

Detailed Description

Useful string-processing functions that some platforms don't provide.

Definition in file compat_string.c.

Function Documentation

◆ strtok_helper()

static char* strtok_helper ( char *  cp,
const char *  sep 
)
static

Helper for tor_strtok_r_impl: Advances cp past all characters in sep, and returns its new value.

Definition at line 29 of file compat_string.c.

◆ tor_strtok_r_impl()

char* tor_strtok_r_impl ( char *  str,
const char *  sep,
char **  lasts 
)

Implementation of strtok_r for platforms whose coders haven't figured out how to write one. Hey, retrograde libc developers! You can use this code here for free!

Definition at line 45 of file compat_string.c.