summaryrefslogtreecommitdiffstats
path: root/common/utils.c
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2014-10-22 20:52:02 +0200
committerGravatar Martin Szulecki2014-10-22 22:21:06 +0200
commit57538472cb86d6b376f933e9e416eb769f7c00b7 (patch)
treee0cff41e2924c759295526e37d43086db664eb19 /common/utils.c
parent067c7c682614fbf0b7aeb13fd8b8ba7dc4fd8bf2 (diff)
downloadlibimobiledevice-57538472cb86d6b376f933e9e416eb769f7c00b7.tar.gz
libimobiledevice-57538472cb86d6b376f933e9e416eb769f7c00b7.tar.bz2
common: Move string_toupper() helper to utils and use it in idevicebackup tools
Diffstat (limited to 'common/utils.c')
-rw-r--r--common/utils.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/common/utils.c b/common/utils.c
index fb6822f..f95ecfd 100644
--- a/common/utils.c
+++ b/common/utils.c
@@ -139,6 +139,16 @@ char *string_build_path(const char *elem, ...)
return out;
}
+char *string_toupper(char* str)
+{
+ char *res = strdup(str);
+ unsigned int i;
+ for (i = 0; i < strlen(res); i++) {
+ res[i] = toupper(res[i]);
+ }
+ return res;
+}
+
static int get_rand(int min, int max)
{
int retval = (rand() % (max - min)) + min;