/* This file is automatically generated by unicode-ucd-compile.py from:
     ./ucd/CaseFolding.txt
     ./ucd/CompositionExclusions.txt
     ./ucd/DerivedCoreProperties.txt
     ./ucd/DerivedNormalizationProps.txt
     ./ucd/GraphemeBreakProperty.txt
     ./ucd/PropList.txt
     ./ucd/PropertyValueAliases.txt
     ./ucd/SpecialCasing.txt
     ./ucd/UnicodeData.txt
     ./ucd/WordBreakProperty.txt
     ./ucd/emoji-data.txt
 */

#include "lib.h"
#include "unicode-data-types.h"

/* Decomposition_Type */
enum unicode_decomposition_type
unicode_decomposition_type_from_string(const char *str)
{
	/* Canonical */
	if (strcasecmp(str, "Canonical") == 0)
		return UNICODE_DECOMPOSITION_TYPE_CANONICAL;
	/* <Compat> */
	else if (strcasecmp(str, "Compat") == 0)
		return UNICODE_DECOMPOSITION_TYPE_COMPAT;
	/* <Circle> */
	else if (strcasecmp(str, "Circle") == 0)
		return UNICODE_DECOMPOSITION_TYPE_CIRCLE;
	/* <Final> */
	else if (strcasecmp(str, "Final") == 0)
		return UNICODE_DECOMPOSITION_TYPE_FINAL;
	/* <Font> */
	else if (strcasecmp(str, "Font") == 0)
		return UNICODE_DECOMPOSITION_TYPE_FONT;
	/* <Fraction> */
	else if (strcasecmp(str, "Fraction") == 0)
		return UNICODE_DECOMPOSITION_TYPE_FRACTION;
	/* <Initial> */
	else if (strcasecmp(str, "Initial") == 0)
		return UNICODE_DECOMPOSITION_TYPE_INITIAL;
	/* <Isolated> */
	else if (strcasecmp(str, "Isolated") == 0)
		return UNICODE_DECOMPOSITION_TYPE_ISOLATED;
	/* <Medial> */
	else if (strcasecmp(str, "Medial") == 0)
		return UNICODE_DECOMPOSITION_TYPE_MEDIAL;
	/* <Narrow> */
	else if (strcasecmp(str, "Narrow") == 0)
		return UNICODE_DECOMPOSITION_TYPE_NARROW;
	/* <Nobreak> */
	else if (strcasecmp(str, "Nobreak") == 0)
		return UNICODE_DECOMPOSITION_TYPE_NOBREAK;
	/* <None> */
	else if (strcasecmp(str, "None") == 0)
		return UNICODE_DECOMPOSITION_TYPE_NONE;
	/* <Small> */
	else if (strcasecmp(str, "Small") == 0)
		return UNICODE_DECOMPOSITION_TYPE_SMALL;
	/* <Square> */
	else if (strcasecmp(str, "Square") == 0)
		return UNICODE_DECOMPOSITION_TYPE_SQUARE;
	/* <Sub> */
	else if (strcasecmp(str, "Sub") == 0)
		return UNICODE_DECOMPOSITION_TYPE_SUB;
	/* <Super> */
	else if (strcasecmp(str, "Super") == 0)
		return UNICODE_DECOMPOSITION_TYPE_SUPER;
	/* <Vertical> */
	else if (strcasecmp(str, "Vertical") == 0)
		return UNICODE_DECOMPOSITION_TYPE_VERTICAL;
	/* <Wide> */
	else if (strcasecmp(str, "Wide") == 0)
		return UNICODE_DECOMPOSITION_TYPE_WIDE;

	return UNICODE_DECOMPOSITION_TYPE_CANONICAL;
}
