mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-03 08:00:50 +00:00
string utility
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@367 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
17
src/string.c
Normal file
17
src/string.c
Normal file
@@ -0,0 +1,17 @@
|
||||
/* $Id$ */
|
||||
#include <Mw/Milsko.h>
|
||||
|
||||
char* MwStringDupliacte(const char* str) {
|
||||
char* r = malloc(strlen(str) + 1);
|
||||
strcpy(r, str);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
char* MwStringConcat(const char* str1, const char* str2) {
|
||||
char* r = malloc(strlen(str1) + strlen(str2) + 1);
|
||||
strcpy(r, str1);
|
||||
strcat(r, str2);
|
||||
|
||||
return r;
|
||||
}
|
||||
Reference in New Issue
Block a user