summaryrefslogtreecommitdiff
path: root/src/z-util.c
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2014-06-07 09:40:26 +0200
committerBardur Arantsson <bardur@scientician.net>2014-06-26 04:19:42 +0200
commit62bcb16ba7fdda8f87d5b698546c4b3ba4b721cd (patch)
tree664b12659dcaf223c6141e3b6e1f53b8d516e922 /src/z-util.c
parent41b65b07a5ac89bad9533487b2233d309e7fc86d (diff)
Remove a usage of vstrnfmt()
Diffstat (limited to 'src/z-util.c')
-rw-r--r--src/z-util.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/z-util.c b/src/z-util.c
index 7c5374f3..4e10a67b 100644
--- a/src/z-util.c
+++ b/src/z-util.c
@@ -4,6 +4,7 @@
#include "z-util.h"
+#include <assert.h>
/*
@@ -150,6 +151,27 @@ bool_ suffix(cptr s, cptr t)
}
+/**
+ * Captialize letter
+ */
+void capitalize(char *s)
+{
+ char *p = s;
+ assert(s != NULL);
+
+ for (; *p; p++)
+ {
+ if (!isspace(*p))
+ {
+ if (islower(*p))
+ {
+ *p = toupper(*p);
+ }
+ /* Done */
+ break;
+ }
+ }
+}
/*