Files
ROC/cms/persistence/implementation/common/string_helper.e
jvelilla 789b26eafa Move libraries layout', model', `peristence' under cms folder
Updated code to the new layout.
Added missing comments.
Remove /example/api
2014-11-12 17:24:34 -03:00

54 lines
962 B
Plaintext

note
description: "Summary description for {STRING_HELPER}."
date: "$Date: 2014-08-08 16:02:11 -0300 (vi., 08 ago. 2014) $"
revision: "$Revision: 95593 $"
class
STRING_HELPER
feature -- Access
is_blank (s: detachable READABLE_STRING_32): BOOLEAN
local
i,n: INTEGER
do
Result := True
if s /= Void then
from
i := 1
n := s.count
until
i > n or not Result
loop
Result := s[i].is_space
i := i + 1
end
end
end
indented_text (pre: READABLE_STRING_8; t: READABLE_STRING_8): READABLE_STRING_8
-- Indendted text.
local
s8: STRING_8
do
s8 := t.string
s8.prepend (pre)
s8.replace_substring_all ("%N", "%N" + pre)
Result := s8
end
json_encode (a_string: STRING): STRING
-- json encode `a_string'.
local
encode: SHARED_JSON_ENCODER
do
create encode
Result := encode.json_encoder.encoded_string (a_string)
debug
print ("%NResult" + Result)
end
end
end