}
+// ----------------------------------------------------------------------------
+// various string functions
+// ----------------------------------------------------------------------------
+
+void *getMemCopy(const void *m, size_t size)
+{
+ void *m_copy;
+
+ if (m == NULL)
+ return NULL;
+
+ m_copy = checked_malloc(size);
+ memcpy(m_copy, m, size);
+
+ return m_copy;
+}
+
+
// ----------------------------------------------------------------------------
// various string functions
// ----------------------------------------------------------------------------
return s_copy;
}
+char *getStringToUpper(const char *s)
+{
+ char *s_copy = checked_malloc(strlen(s) + 1);
+ char *s_ptr = s_copy;
+
+ while (*s)
+ *s_ptr++ = toupper(*s++);
+ *s_ptr = '\0';
+
+ return s_copy;
+}
+
char *getStringToLower(const char *s)
{
char *s_copy = checked_malloc(strlen(s) + 1);