Removed trimmed_string function and callers, and for now, use (left_|right_)adjust

This commit is contained in:
2013-10-23 12:46:36 +02:00
parent ddd19023b0
commit 4dd1731e60
2 changed files with 12 additions and 27 deletions
@@ -12,30 +12,19 @@ inherit
feature {NONE} -- Helpers
entity_value (a_str: READABLE_STRING_8): READABLE_STRING_8
entity_value (a_str: READABLE_STRING_8): STRING_8
-- `s' with any trailing parameters stripped
local
p: INTEGER
do
p := a_str.index_of (';', 1)
if p > 0 then
Result := trimmed_string (a_str.substring (1, p - 1))
create Result.make_from_string (a_str.substring (1, p - 1))
else
Result := trimmed_string (a_str.string)
create Result.make_from_string (a_str)
end
end
trimmed_string (a_string: READABLE_STRING_8): STRING_8
-- trim whitespace from the beginning and end of a string
-- `a_string'
require
valid_argument : a_string /= Void
do
create Result.make_from_string (a_string)
Result.left_adjust
Result.right_adjust
ensure
result_trimmed: a_string.has_substring (Result)
end
note