BFLibC 0.1
C Library
Loading...
Searching...
No Matches
stringutils.c File Reference
#include "stringutils.h"
#include "free.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
#include <uuid/uuid.h>
Include dependency graph for stringutils.c:

Functions

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

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)

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