From bd33aabd93fbe7313376043b80d35062d8424ce7 Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Mon, 30 Apr 2012 15:49:24 +0200 Subject: [PATCH] Added specific helper function related to `charset' parameter --- library/protocol/http/src/http_content_type.e | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/library/protocol/http/src/http_content_type.e b/library/protocol/http/src/http_content_type.e index a1ac0088..718e8162 100644 --- a/library/protocol/http/src/http_content_type.e +++ b/library/protocol/http/src/http_content_type.e @@ -19,6 +19,24 @@ convert make_from_string ({READABLE_STRING_8, STRING_8, IMMUTABLE_STRING_8}), string: {READABLE_STRING_8} +feature -- Access + + charset_parameter: detachable READABLE_STRING_8 + do + if has_charset_parameter then + Result := parameter (charset_parameter_name) + end + end + + has_charset_parameter: BOOLEAN + do + Result := has_parameter (charset_parameter_name) + end + +feature -- Constant + + charset_parameter_name: STRING_8 = "charset" + note copyright: "2011-2012, Jocelyn Fiat, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"