#include #include #include #include "memory.h" #include "util.h" char* copy_buf(char *buf,int len){ char *dst=malloc(len+1,char); memcpy(dst,buf,len); dst[len]='\0'; return dst; } char* copy_str(char *str){ return copy_buf(str,strlen(str)); } void str_toupper(char *str){ while(*str!='\0'){ *str=toupper(*str); str++; } }