c61bfcdc84cfc35b2105e85b5c180b4dde9b74ba
[babeltrace.git] / lib / types / string.c
1 /*
2 * Common Trace Format
3 *
4 * Strings read/write functions.
5 *
6 * Copyright 2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
7 *
8 * Dual LGPL v2.1/GPL v2 license.
9 */
10
11 #include <ctf/ctf-types.h>
12 #include <string.h>
13
14 size_t string_copy(char *dest, const char *src)
15 {
16 size_t len = strlen(src) + 1;
17
18 if (!dest)
19 goto end;
20 strcpy(dest, src);
21 end:
22 return len * 8;
23 }
This page took 0.029247 seconds and 3 git commands to generate.