mcabber/src/utils.c
changeset 1192 7b8765c10abb
parent 1167 9726c78a91f3
child 1203 c96fef31ff96
--- a/mcabber/src/utils.c	Sat Apr 21 10:18:17 2007 +0200
+++ b/mcabber/src/utils.c	Sat Apr 21 12:06:13 2007 +0200
@@ -648,4 +648,13 @@
 }
 #endif /* !HAVE_STRCASESTR */
 
+//  startswith(str, word)
+// Returns TRUE if string str starts with word.
+int startswith(const char *str, const char *word)
+{
+  if (!strncmp(str, word, strlen(word)))
+    return TRUE;
+  return FALSE;
+}
+
 /* vim: set expandtab cindent cinoptions=>2\:2(0:  For Vim users... */