+/* Blue Sky: File Systems in the Cloud
+ *
+ * Copyright (C) 2009 The Regents of the University of California
+ * Written by Michael Vrable <mvrable@cs.ucsd.edu>
+ *
+ * TODO: Licensing
+ */
+
+#include <stdio.h>
+#include <stdint.h>
+#include <glib.h>
+#include <string.h>
+
+#include "bluesky.h"
+
+/* Miscellaneous useful functions that don't really fit anywhere else. */
+
+
+/* Convert a UTF-8 string to lowercase. This can be used to implement
+ * case-insensitive lookups and comparisons, by normalizing all values to
+ * lowercase first. Returns a newly-allocated string as a result. */
+gchar *bluesky_lowercase(const gchar *s)
+{
+ /* TODO: Unicode handling; for now just do ASCII. */
+ return g_ascii_strdown(s, -1);
+}