coerces non-nil using to_s
# File net-imap-0.2.2/lib/net/imap/command_data.rb, line 294
def nstring(str)
str.nil? ? nil : string(str)
end
coerces using to_s
# File net-imap-0.2.2/lib/net/imap/command_data.rb, line 284
def string(str)
str = str.to_s
if str =~ LITERAL_REGEX
Literal.new(str)
else
QuotedString.new(str)
end
end