CiFEr
Data Structures | Typedefs | Functions
str.h File Reference

Internal functions for dealing with strings. More...

Go to the source code of this file.

Data Structures

struct  cfe_string
 

Typedefs

typedef struct cfe_string cfe_string
 

Functions

int cfe_str_to_int (cfe_string *str_int)
 
void cfe_substring (cfe_string *out, cfe_string *in, size_t start, size_t stop)
 
void cfe_remove_spaces (cfe_string *out, cfe_string *source)
 
void cfe_string_free (cfe_string *str)
 
void cfe_strings_concat (cfe_string *out, cfe_string *start,...)
 
void cfe_int_to_str (cfe_string *out, int i)
 

Detailed Description

Internal functions for dealing with strings.

Typedef Documentation

◆ cfe_string

typedef struct cfe_string cfe_string

cfe_string is an internal struct that holds a string and its length.

Function Documentation

◆ cfe_str_to_int()

int cfe_str_to_int ( cfe_string str_int)

A helping function that transforms a string with an integer to an int.

◆ cfe_substring()

void cfe_substring ( cfe_string out,
cfe_string in,
size_t  start,
size_t  stop 
)

A helping function that takes a substring of a string.

◆ cfe_remove_spaces()

void cfe_remove_spaces ( cfe_string out,
cfe_string source 
)

A helping function that removes spaces in a string

◆ cfe_string_free()

void cfe_string_free ( cfe_string str)

A function that frees the memory of a string in a cfe_string struct.

◆ cfe_strings_concat()

void cfe_strings_concat ( cfe_string out,
cfe_string start,
  ... 
)

The function concatenates given strings.

Parameters
outResult will be saved here
startStrings to bo joined

◆ cfe_int_to_str()

void cfe_int_to_str ( cfe_string out,
int  i 
)

The function converts a non-negative int into a string of its decimal representation that can be used for hashing.

Parameters
outResult will be saved here
iNon-negative integer