BFLibC 0.1
C Library
Loading...
Searching...
No Matches
stringutils.h File Reference
#include <uuid/uuid.h>
#include <stdarg.h>
#include <sys/types.h>
#include <stddef.h>
Include dependency graph for stringutils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define kBFStringUUIDStringLength   37
 
#define BFStringIntegerToChar(i)   i + '0'
 

Functions

char * BFStringCopyString (const char *string)
 
void BFStringGetRandomUUIDString (char *uuidString)
 
char * BFStringCreateFromFile (const char *file)
 
int BFStringCompareUUID (const char *uuid0, const char *uuid1)
 
char * BFStringCreateFormatString (const char *format,...)
 
char * BFStringCreateFormatArgListString (const char *format, va_list valist)
 
char ** BFStringCreateArrayFromString (const char *str, size_t *size, const char *delim)
 

Macro Definition Documentation

◆ BFStringIntegerToChar

#define BFStringIntegerToChar ( i)    i + '0'

◆ kBFStringUUIDStringLength

#define kBFStringUUIDStringLength   37

author: Brando date: 10/5/22

Function Documentation

◆ BFStringCompareUUID()

int BFStringCompareUUID ( const char * uuid0,
const char * uuid1 )

compares uuid0 with uuid1

if params are null, undefined behavior will occur

returns memcmp results. see memcmp documentation

◆ BFStringCopyString()

char * BFStringCopyString ( const char * string)

Creates a copy of string

Caller must free

returns NULL if unsuccessful

author: Brando date: 10/5/22

◆ BFStringCreateArrayFromString()

char ** BFStringCreateArrayFromString ( const char * str,
size_t * size,
const char * delim )

creates an array from str using the delim

caller must free memory

returns NULL on error

Here is the call graph for this function:

◆ BFStringCreateFormatArgListString()

char * BFStringCreateFormatArgListString ( const char * format,
va_list valist )

see BFStringCreateFormatString

◆ BFStringCreateFormatString()

char * BFStringCreateFormatString ( const char * format,
... )

creates a string defined by format

Here is the call graph for this function:

◆ BFStringCreateFromFile()

char * BFStringCreateFromFile ( const char * file)

returns null if there was an error. Caller owns memory, use BFFree

◆ BFStringGetRandomUUIDString()

void BFStringGetRandomUUIDString ( char * uuidString)

Creates a uuid string for you