3D-ICE 3.0.0
Typedefs | Functions
string_t.h File Reference
#include <stdbool.h>

Go to the source code of this file.

Typedefs

typedef char * String_t
 

Functions

void string_init (String_t *string)
 
bool string_equal (String_t *string, String_t *other)
 
void string_copy (String_t *dst, String_t *src)
 
void string_copy_cstr (String_t *dst, char *src)
 
void string_destroy (String_t *string)
 

Typedef Documentation

◆ String_t

typedef char* String_t

Definition of the primitive type String_t

Definition at line 55 of file string_t.h.

Function Documentation

◆ string_copy()

void string_copy ( String_t dst,
String_t src 
)

Copies the string src into dst , as an assignement

The function destroys the content of dst and then makes the copy

Parameters
dstthe address of the left term string (destination)
srcthe address of the right term string (source)

Definition at line 53 of file string_t.c.

◆ string_copy_cstr()

void string_copy_cstr ( String_t dst,
char *  src 
)

Copies the C string src into dst , as an assignement

The function destroys the content of dst and then makes the copy

Parameters
dstthe address of the left term string (destination)
srcthe address of the right term C string (source)

Definition at line 62 of file string_t.c.

◆ string_destroy()

void string_destroy ( String_t string)

Destroys the content of the string

The function releases the memory used by the string and resets its state calling string_init .

Parameters
stringthe address of the string to destroy

Definition at line 78 of file string_t.c.

◆ string_equal()

bool string_equal ( String_t string,
String_t other 
)

Tests if two strings are equal

Parameters
stringthe first string
otherthe second string
Returns
TRUE if string and other are the same string
FALSE otherwise

Definition at line 71 of file string_t.c.

◆ string_init()

void string_init ( String_t string)

Inits the string structure with a default value

Parameters
stringthe address of the string to initalize

Definition at line 46 of file string_t.c.