Subversion Repositories IRCServ

Rev

Rev 5 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5 Rev 7
Line 1... Line 1...
1
/* $Id: util.c 5 2024-08-25 11:58:10Z nishi $ */
1
/* $Id: util.c 7 2024-08-25 20:49:55Z nishi $ */
2
 
2
 
3
#include "is_util.h"
3
#include "is_util.h"
4
 
4
 
5
#include <string.h>
5
#include <string.h>
6
#include <stdlib.h>
6
#include <stdlib.h>
Line 10... Line 10...
10
	memcpy(str, a, strlen(a));
10
	memcpy(str, a, strlen(a));
11
	memcpy(str + strlen(a), b, strlen(b));
11
	memcpy(str + strlen(a), b, strlen(b));
12
	str[strlen(a) + strlen(b)] = 0;
12
	str[strlen(a) + strlen(b)] = 0;
13
	return str;
13
	return str;
14
}
14
}
-
 
15
 
-
 
16
char* is_strcat3(const char* a, const char* b, const char* c) {
-
 
17
	char* tmp = is_strcat(a, b);
-
 
18
	char* str = is_strcat(tmp, c);
-
 
19
	free(tmp);
-
 
20
 
-
 
21
	return str;
-
 
22
}
-
 
23
 
-
 
24
char* is_strdup(const char* str) { return is_strcat(str, ""); }