7 self = self@matlab.unittest.TestCase(varargin{:});
13 function test_shortcapstr(
self)
14 check('one2oneContr','o2oC');
15 check('plainIV','pIV');
16 check('one2oneContr_plainIV','o2oC_pIV');
17 check('vertical spread','vs');
19 function check(inpStr,expStr)
22 self.verifyEqual(resStr,expStr);
25 function self=test_splitpart(self)
29 self.verifyEqual(true,false);
31 self.verifyEqual(~isempty(strfind(meObj.identifier,':wrongInput')),true);
35 self.verifyEqual('',resStr);
43 function self=test_catwithsep(self)
45 self.verifyEqual(outStr,
'aaa__bbb');
47 function self=test_catcellstrwithsep(
self)
49 {
'aa',
'bb';
'aaa',
'bbb';
'a',
'b'},
'-');
50 self.verifyEqual(
true,...
51 isequal(outCVec,{
'aa-bb';
'aaa-bbb';
'a-b'}));
53 function test_sepcellstrbysep(
self)
54 inpCMat={
'aa',
'bb';
'aaa',
'bbb';
'a',
'b'};
67 self.verifyEqual(true,isequal(resCMat,inpCMat));
function sepcellstrbysep(in inpCVec, in sepStr)
SEPCELLSTRBYSEP splits elements of input cell column vector of strings using a specified separator an...
function catcellstrwithsep(in inpCMat, in sepStr)
CATCELLSTRWITHSEP contatenates columns of input cell matrix of strings using a specified separator an...
function splitpart(in inpStr, in delimStr, in fieldNum)
SPLITPART splits string on delimiter and return the given field (counting from one) ...
function shortcapstr(in longName)
function catwithsep(in inpStrList, in sepStr)
CATWITHSEP concatenates input cell array of strings inserting a specified separator between the strin...