From 9550c87327cdb0c97ca855bc5d77d28cbbb723d5 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 30 Jun 2010 21:31:45 +0200 Subject: tag: added function tag_name_parse() Convert a string into a tag_type enum. --- src/tag.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/tag.h') diff --git a/src/tag.h b/src/tag.h index 75a86b387..8d968c254 100644 --- a/src/tag.h +++ b/src/tag.h @@ -93,6 +93,22 @@ struct tag { unsigned num_items; }; +/** + * Parse the string, and convert it into a #tag_type. Returns + * #TAG_NUM_OF_ITEM_TYPES if the string could not be recognized. + */ +enum tag_type +tag_name_parse(const char *name); + +/** + * Parse the string, and convert it into a #tag_type. Returns + * #TAG_NUM_OF_ITEM_TYPES if the string could not be recognized. + * + * Case does not matter. + */ +enum tag_type +tag_name_parse_i(const char *name); + /** * Creates an empty #tag. */ -- cgit v1.2.3