Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
cstr = {' Trim leading white-space';
'Trim trailing white-space '};
y_correct = {'Trim leading white-space';'Trim trailing white-space'};
assert(isequal(white_space_remove(cstr),y_correct))
ans =
2×1 cell array
{'Trim leading white-space' }
{'Trim trailing white-space'}
|
2 | Pass |
NL = char(0);
TAB = char(9);
x = [NL 32 TAB NL 'AB' 32 NL 'CD' NL 32 TAB NL 32];
y_correct = [NL 32 TAB NL 'AB' 32 NL 'CD' NL 32 TAB NL];
assert(isequal(white_space_remove(x),y_correct))
ans =
' AB CD '
|
Project Euler: Problem 8, Find largest product in a large string of numbers
315 Solvers
Number of 1s in a binary string
2818 Solvers
07 - Common functions and indexing 6
348 Solvers
272 Solvers
275 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!