+void UnderlineTypeStringToTypeValue(const char* const typeStr, Length length, Text::Underline::Type& retType)
+{
+ if(TokenComparison(SOLID_UNDERLINE, typeStr, length))
+ {
+ retType = Text::Underline::SOLID;
+ }
+ else if(TokenComparison(DASHED_UNDERLINE, typeStr, length))
+ {
+ retType = Text::Underline::DASHED;
+ }
+ else if(TokenComparison(DOUBLE_UNDERLINE, typeStr, length))
+ {
+ retType = Text::Underline::DOUBLE;
+ }
+}
+
+bool HorizontalAlignmentTypeStringToTypeValue(const char* const typeStr, Length length, Text::HorizontalAlignment::Type& retType)
+{
+ // The string is valid value for HorizontalAlignment
+ bool valid = false;
+ if(TokenComparison(BEGIN_HORIZONTAL_ALIGNMENT, typeStr, length))
+ {
+ retType = Text::HorizontalAlignment::BEGIN;
+ valid = true;
+ }
+ else if(TokenComparison(CENTER_HORIZONTAL_ALIGNMENT, typeStr, length))
+ {
+ retType = Text::HorizontalAlignment::CENTER;
+ valid = true;
+ }
+ else if(TokenComparison(END_HORIZONTAL_ALIGNMENT, typeStr, length))
+ {
+ retType = Text::HorizontalAlignment::END;
+ valid = true;
+ }
+
+ return valid;
+}
+