Cody

Solution 1613318

Submitted on 20 Aug 2018 by Tim
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
input_str= 'This is a test sentence' Start_string= ' is' End_string= 'sentence' include_se=1 output_str= {' is a test sentence'} assert(isequal(extract_function(input_str,Start_string,End_string, include_se),output_str))

input_str = 'This is a test sentence' Start_string = ' is' End_string = 'sentence' include_se = 1 output_str = 1×1 cell array {' is a test sentence'}

2   Pass
input_str= 'This is a test sentence' Start_string= ' is' End_string= 'sentence' include_se=0 output_str={' a test '} assert(isequal(extract_function(input_str,Start_string,End_string, include_se),output_str))

input_str = 'This is a test sentence' Start_string = ' is' End_string = 'sentence' include_se = 0 output_str = 1×1 cell array {' a test '}

3   Pass
input_str= 'Right now!I said RIGHT NOW!' Start_string= 'now!' End_string= '!' include_se=0 output_str={'I said RIGHT NOW'} assert(isequal(extract_function(input_str,Start_string,End_string, include_se),output_str))

input_str = 'Right now!I said RIGHT NOW!' Start_string = 'now!' End_string = '!' include_se = 0 output_str = 1×1 cell array {'I said RIGHT NOW'}