string_dup.c 336 B

1234567891011121314151617
  1. /*
  2. * string_dup.c
  3. */
  4. #include "private.h"
  5. #include <string.h>
  6. /*--------------------------------------------------------- */
  7. char *lub_string_dup(const char *string)
  8. {
  9. char *result = NULL;
  10. if (NULL != string) {
  11. lub_string_cat(&result, string);
  12. }
  13. return result;
  14. }
  15. /*--------------------------------------------------------- */