static HtmlTag forString()

in juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlTag.java [88:138]


	static HtmlTag forString(String tag, boolean end) {
		char c = tag.charAt(0);
		HtmlTag t = null;
		if (c == 'u')
			t = (end ? xUL : UL);
		else if (c == 'l')
			t = (end ? xLI : LI);
		else if (c == 's') {
			c = tag.charAt(1);
			if (c == 'p')
				t = (end ? xSP : SP);
			else if (c == 't')
				t = (end ? xSTRING : STRING);
		}
		else if (c == 'b') {
			c = tag.charAt(1);
			if (c == 'o')
				t = (end ? xBOOLEAN : BOOLEAN);
			else if (c == 'r')
				t = (end ? xBR : BR);
			else if (c == 's')
				t = (end ? xBS : BS);
		}
		else if (c == 'a')
			t = (end ? xA : A);
		else if (c == 'n') {
			c = tag.charAt(2);
			if (c == 'm')
				t = (end ? xNUMBER : NUMBER);
			else if (c == 'l')
				t = (end ? xNULL : NULL);
		}
		else if (c == 't') {
			c = tag.charAt(1);
			if (c == 'a')
				t = (end ? xTABLE : TABLE);
			else if (c == 'r')
				t = (end ? xTR : TR);
			else if (c == 'h')
				t = (end ? xTH : TH);
			else if (c == 'd')
				t = (end ? xTD : TD);
		}
		else if (c == 'f')
			t = (end ? xFF : FF);
		else if (c == 'p')
			t = (end ? xP : P);
		else if (c == 'h')
			t = (end ? xHTML : HTML);
		return t;
	}