source: ThirdParty/mpqc_open/src/lib/util/misc/string.h@ a844d8

Candidate_v1.6.1
Last change on this file since a844d8 was 860145, checked in by Frederik Heber <heber@…>, 8 years ago

Merge commit '0b990dfaa8c6007a996d030163a25f7f5fc8a7e7' as 'ThirdParty/mpqc_open'

  • Property mode set to 100644
File size: 251 bytes
Line 
1
2#ifndef _util_misc_string_h
3#define _util_misc_string_h
4
5#include <string.h>
6#include <stdlib.h>
7
8namespace sc {
9
10inline char *
11strdup (const char *string)
12{
13 return string ? strcpy ((char *) malloc (strlen (string) + 1), string) : 0;
14}
15
16}
17
18#endif
Note: See TracBrowser for help on using the repository browser.