Commit Graph

10 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 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 7865557fd5 core/string: Realloc strings before returning
g_strchomp() modifies the string in place, but doesn't free up unused
memory at the end of the original string.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-11-10 10:55:38 -05:00
Anna Schumaker 461cbdb9c3 core/string: Use g_utf8_collate() for string comparisons
This function compares strings using "linguistically correct rules for
the current locale".

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-11-02 14:13:00 -05:00
Anna Schumaker 6b25987785 core/string: Add unicode handling to string_lowercase()
This helps improve filtering, since I drop all modifications to
characters (such as accents over an 'e').

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-11-02 14:13:00 -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