Fixing issue with experimental WGI_MULTIPLE_STRING_VALUE

Fixed issue with RAW_POST_DATA
This commit is contained in:
Jocelyn Fiat
2011-09-23 18:21:57 +02:00
parent e7fd7af2c5
commit 668847f8e8
2 changed files with 35 additions and 3 deletions

View File

@@ -14,6 +14,7 @@ inherit
create
make_with_value,
make_with_array,
make_with_string
feature {NONE} -- Initialization
@@ -25,6 +26,26 @@ feature {NONE} -- Initialization
add_value (a_value)
end
make_with_array (arr: ARRAY [WGI_VALUE])
require
arr_not_empty: not arr.is_empty
all_same_name: across arr as c all c.item.name.same_string (arr[arr.lower].name) end
local
i,up: INTEGER
do
up := arr.upper
i := arr.lower
make_with_value (arr[i])
from
i := i + 1
until
i > up
loop
add_value (arr[i])
i := i + 1
end
end
make_with_string (a_name: like name; a_string: READABLE_STRING_32)
do
make_with_value (create {WGI_STRING_VALUE}.make (a_name, a_string))
@@ -75,7 +96,7 @@ feature -- Helper
across
string_values as c
loop
if Result.count = 1 then
if Result.count > 1 then
Result.append_character (',')
end
Result.append_string (c.item)