46 buffer = malloc(Length + 1);
86 const char * oldString =
"";
87 char * newString = NULL;
91 oldString = OldString;
94 len = strlen(oldString) + 1;
96 newString = malloc(len);
99 memcpy(newString, oldString, len);
138 char * newString = NULL;
142 size_t len = strlen(OldString);
144 len = len < Length ? len : Length;
146 newString = malloc(len + 1);
150 memcpy(newString, OldString, len);
174 void * p = (
void *) String;
205 const char * string1 =
"";
206 const char * string2 =
"";
217 ret = malloc(strlen(string1) + strlen(string2) + 1);
222 strcpy(ret, string1);
223 strcat(ret, string2);
char * cbmlibmisc_strdup(const char *const OldString)
Duplicate a given string.
void cbmlibmisc_strfree(const char *String)
Free a string.
char * cbmlibmisc_stralloc(unsigned int Length)
allocate memory for a string of a given size
char * cbmlibmisc_strcat(const char *First, const char *Second)
Concatenate two strings.
char * cbmlibmisc_strndup(const char *const OldString, size_t Length)
Duplicate a prefix of a given string.
Define makros and functions which account for differences between the different architectures.