diff mcabber/src/utils.c @ 1192:7b8765c10abb

New command: /source
author Mikael Berthe <mikael@lilotux.net>
date Sat, 21 Apr 2007 12:06:13 +0200
parents 9726c78a91f3
children c96fef31ff96
line wrap: on
line diff
--- 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... */