tag: added function tag_name_parse()

Convert a string into a tag_type enum.
This commit is contained in:
Max Kellermann
2010-06-30 21:31:45 +02:00
parent e223e8a5b5
commit 9550c87327
3 changed files with 60 additions and 12 deletions

View File

@@ -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.
*/