Cody

Problem 35. Quote Doubler

Solution 30963

Submitted on 6 Feb 2012 by Niklas Nylén
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
%% s1 = 'He said ''Look over there!'''; s2_correct = 'He said ''''Look over there!'''''; assert(isequal(quote_doubler(s1),s2_correct))

{Warning: Inputs must be character arrays or cell arrays of strings.} {> In quote_doubler at 2 In verifyCode>evaluateCode at 188 In verifyCode at 37 In fevalJSON at 14} s2 = He said ''Look over there!''

2   Pass
%% s1 = ''''; s2_correct = ''''''; assert(isequal(quote_doubler(s1),s2_correct))

{Warning: Inputs must be character arrays or cell arrays of strings.} {> In quote_doubler at 2 In verifyCode>evaluateCode at 188 In verifyCode at 37 In fevalJSON at 14} s2 = ''

Suggested Problems

More from this Author95

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!