#include "scm.h"

/* Converts a SCM string into a C string (the inverse of makfrom0str). */
char* mak0strfrom(SCM string)
{
  sizet len = 1 + LENGTH(string);
  char *dst = (char *) must_malloc((long) len, s_string);
  char *src = CHARS(string);
  dst[len] = '\0';
  while (len--) dst[len] = src[len];
  return dst;
}
