Cody

# Problem 44295. More Simple String Concatenation

Solution 1269313

Submitted on 16 Sep 2017 by LY Cao
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
str1 = 'apple'; str2 = 'pear'; concat_str = 'elppa pear'; assert(isequal(your_fcn_name(str1, str2),concat_str))

ans = 'elppa pear' a = 'elppa pear' b = logical 0 n = 10

2   Pass
str1 = 'one'; str2 = 'two'; concat_str = 'eno two'; assert(isequal(your_fcn_name(str1, str2),concat_str))

ans = 'eno two' a = 'eno two' b = logical 0 n = 7

3   Pass
str1 = 'one two'; str2 = 'three four'; concat_str = 'owt eno three four'; assert(isequal(your_fcn_name(str1, str2),concat_str))

ans = 'owt eno three four' a = 'owt eno three four' b = logical 0 n = 18

4   Pass
str1 = 'hello'; str2 = 'there'; concat_str = 'olleh there'; assert(isequal(your_fcn_name(str1, str2),concat_str))

ans = 'olleh there' a = 'olleh there' b = logical 0 n = 11

5   Pass
str1 = 'This is half a sentence;'; str2 = 'here is the other half.'; concat_str = ';ecnetnes a flah si sihT here is the other half.'; assert(isequal(your_fcn_name(str1, str2),concat_str))

ans = ';ecnetnes a flah si sihT here is the other half.' a = ';ecnetnes a flah si sihT here is the other half.' b = logical 0 n = 48

6   Pass
str1 = 'left'; str2 = 'right'; concat_str = 'tfel right'; assert(isequal(your_fcn_name(str1, str2),concat_str))

ans = 'tfel right' a = 'tfel right' b = logical 0 n = 10

7   Pass
str1 = 'right'; str2 = 'left'; concat_str = 'thgir left'; assert(isequal(your_fcn_name(str1, str2),concat_str))

ans = 'thgir left' a = 'thgir left' b = logical 0 n = 10

8   Pass
str1 = ' leading space'; str2 = 'trailing space '; concat_str = 'ecaps gnidael trailing space '; assert(isequal(your_fcn_name(str1, str2),concat_str))

ans = 'ecaps gnidael trailing space ' a = 'ecaps gnidael trailing space ' b = logical 0 n = 30

9   Pass
str1 = '123'; str2 = '456'; concat_str = '321 456'; assert(isequal(your_fcn_name(str1, str2),concat_str))

ans = '321 456' a = '321 456' b = logical 0 n = 7