ocarina/include/core/string.h
Anna Schumaker 1a3735251d core/string: Move string_lowercase() out of "string" namespace
And refactor to use glib string functions while we're at it.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-10-07 09:54:16 -04:00

23 lines
641 B
C

/*
* Copyright 2015 (c) Anna Schumaker.
*
* NOTE: All of these functions allocate and return a new string. It is the
* caller's responsibility to free these strings by calling g_free().
*/
#ifndef OCARINA_CORE_STRING_H
#define OCARINA_CORE_STRING_H
#include <glib.h>
/* Convert number of seconds into a string with format mm:ss. */
gchar *string_sec2str(unsigned int);
/* Convert number of seconds into a long-form time string. */
gchar *string_sec2str_long(unsigned int);
/* Convert the input string to lowercase, dropping special characters. */
gchar *string_lowercase(const gchar *);
#endif /* OCARINA_CORE_STRING_H */