Woolz Image Processing  Version 1.8.3
AlcString

Files

file  AlcString.c
 Provides functions for string duplication.
 

Functions

char * AlcStrDup (const char *srcStr)
 Allocates space for and duplicates the given NULL terminated character string. More...
 
char * AlcStrCat3 (const char *s0, const char *s1, const char *s2)
 Concatonates the three given strings in order into a new allocated string buffer. If all strings are null or zero length then NULL is returned, otherwise if a string is null it is omitted. More...
 
unsigned int AlcStrSFHash (const char *str)
 A hash function for strings based on Paul Hsieh's SuperFastHash function which is covered by the LGPL 2.1 license amongst others. The returned value will always be zero if the given string is null of has zero length. More...
 

Detailed Description

Function Documentation

◆ AlcStrDup()

char* AlcStrDup ( const char *  srcStr)

Allocates space for and duplicates the given NULL terminated character string.

Returns
Duplicated string or NULL on error.
Parameters
srcStrGiven string.

References AlcMalloc().

Referenced by BibFileFieldMake(), BibFileFieldParseFmt(), BibFileRecordMake(), BibFileUnEscapeRestrictedChar(), WlzChangeEMAPProperty(), WlzEffBibParseFileRecord(), WlzMakeEMAPProperty(), WlzMakeGreyProperty(), WlzMakeNameProperty(), WlzMakeTextProperty(), and WlzStringCopyReplace().

◆ AlcStrCat3()

char* AlcStrCat3 ( const char *  s0,
const char *  s1,
const char *  s2 
)

Concatonates the three given strings in order into a new allocated string buffer. If all strings are null or zero length then NULL is returned, otherwise if a string is null it is omitted.

Returns
New concatonated string that should be freed using AlcFree() or NULL on error.
Parameters
s0First string.
s1Second string.
s2Third string.

References AlcMalloc().

◆ AlcStrSFHash()

unsigned int AlcStrSFHash ( const char *  str)

A hash function for strings based on Paul Hsieh's SuperFastHash function which is covered by the LGPL 2.1 license amongst others. The returned value will always be zero if the given string is null of has zero length.

Returns
Numeric hash value for the given sting.
Parameters
strGiven string.