Cody

Solution 637044

Submitted on 13 Apr 2015 by Gergely Patay
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

This solution is outdated. To rescore this solution, sign in.

Test Suite

Test Status Code Input and Output
1   Pass
%% x = 'C:\foo\bar\baz\qux'; assert(isequal(shorten(x),'C:\..\qux'))

ans = C:\..\qux

2   Pass
%% x = 'this\is\just\a\test'; assert(isequal(shorten(x),'this\..\test'))

ans = this\..\test

3   Pass
%% x = 'testing\testing\123.mat'; assert(isequal(shorten(x),'testing\..\123.mat'))

ans = testing\..\123.mat