Commit Graph

18 Commits

Author SHA1 Message Date
Anna Schumaker 497ed57057 core/string: Add a function for checking if a string is a subdirectory
I want to use this to prevent users from adding a subdirectory of a path
that has already been added to the library.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2017-09-05 14:59:43 -04:00
Anna Schumaker 11ef52b5de core/string: Remove unused string functions
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-08-29 07:33:00 -04:00
Anna Schumaker f70920015c core/string: Add a function for matching tokens
This will be used to replace the current filtering code with a token
comparison for each track.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-08-29 07:32:59 -04:00
Anna Schumaker de0446120e core/string: Add a comparison function for tokenized strings
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-08-29 07:32:59 -04:00
Anna Schumaker 5a30a63904 core/string: Add string_match() function
This function is used to determine if both strings exist and have the
same contents.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-19 08:13:10 -04:00
Anna Schumaker 98faba93d1 core/string: Add a string_length() function
This is a wrapper around strlen(), but checks for a NULL pointer first.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-06-24 10:50:37 -04:00
Anna Schumaker 0a2abb2b31 core/string: Add string_tm2str() function to get a date stringg
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-11-10 10:55:54 -05:00
Anna Schumaker 023bae737c core/string: Add a function for comparing strings
And switch over the GenericTag to using it.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-10-07 09:59:41 -04:00
Anna Schumaker 60678d1ddb core/string: Convert file to C
And convert the unit test while we're at it.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-10-07 09:56:19 -04:00
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
Anna Schumaker 83fe822dc7 core/string: Move sec2str_detailed() out of "string" namespace
I also take the opportunity to rename the function to
string_sec2str_long().

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-10-07 09:46:30 -04:00
Anna Schumaker a314ee03ca core/string: Move sec2str() out of "string" namespace
And I replace it with a simple call to g_strdup_printf() that does the
exact same thing.  Note that callers are now required to free the
returned string with g_free().

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-10-07 09:33:50 -04:00
Anna Schumaker 82d1da491b core/string: Remove string :: utos()
I replace it with calls to g_strdup_printf().  This has the additional
benefit that I can do uint conversions at the same time as other
formatting options, so this seems like a win.  The only downside is that
I have to manually free the memory that glib allocates, but that's easy
enough.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-10-07 09:31:28 -04:00
Anna Schumaker ead1397b31 Remove Doxygen tags
I wasn't actually using Doxygen for anything, so it's probably best just
to remove it.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-09-02 14:24:42 -04:00
Anna Schumaker 7733e24c07 string: Add a lowercase() function
This function strips out special characters and returns the lowercase
version of the string.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-01-30 09:32:50 -05:00
Anna Schumaker cc6f4c9293 string: Add a function for creating a detailed time string
I use this to display the total running time of queues in the gui.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-01-29 08:27:25 -05:00
Anna Schumaker 12260a3de9 string: Add a function for converting seconds to string
This is used to get a string representation of the number of seconds
passed in.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-01-27 09:23:14 -05:00
Anna Schumaker 6c6437c2bd string: Create a utos() function
This function converts unsigned ints into strings.  This allows me to
replace several almost identical functions with one function call.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-01-27 08:37:27 -05:00