MatrixBerryCore
Namespaces | Functions
mxberry::core::string Namespace Reference

Namespaces

 test
 

Functions

function catcellstrwithsep (in inpCMat, in sepStr)
 CATCELLSTRWITHSEP contatenates columns of input cell matrix of strings using a specified separator and returns result as a column cell vector of strings. More...
 
function catwithsep (in inpStrList, in sepStr)
 CATWITHSEP concatenates input cell array of strings inserting a specified separator between the strings. More...
 
function sepcellstrbysep (in inpCVec, in sepStr)
 SEPCELLSTRBYSEP splits elements of input cell column vector of strings using a specified separator and returns result as a cell matrix of strings, it is assumes that each element is splitted to an equal number of parts. More...
 
function shortcapstr (in longName)
 
function splitpart (in inpStr, in delimStr, in fieldNum)
 SPLITPART splits string on delimiter and return the given field (counting from one) More...
 

Function Documentation

◆ catcellstrwithsep()

function mxberry::core::string::catcellstrwithsep ( in  inpCMat,
in  sepStr 
)

CATCELLSTRWITHSEP contatenates columns of input cell matrix of strings using a specified separator and returns result as a column cell vector of strings.

*  Input:
*    regular:
*        inpCMat: cell[nRows,nCols] of char[1,] - cell matrix of strings
*        sepStr: char[1,] - separator
* 
*  Output:
*    outCVec: cell[nRows,1] of char[1,] - cell vector of strings
* 
Author
Peter Gagarinov, PhD pgaga.nosp@m.rino.nosp@m.v@gma.nosp@m.il.c.nosp@m.om

◆ catwithsep()

function mxberry::core::string::catwithsep ( in  inpStrList,
in  sepStr 
)

CATWITHSEP concatenates input cell array of strings inserting a specified separator between the strings.

*  Input:
*    regular:
*        inpStrList: cell[] of char[1,] - cell array of strings
*        sepStr: char[1,] - separator
* 
*  Output:
*    outStr: char[1,] - resulting string
* 
Author
Peter Gagarinov, PhD pgaga.nosp@m.rino.nosp@m.v@gma.nosp@m.il.c.nosp@m.om

◆ sepcellstrbysep()

function mxberry::core::string::sepcellstrbysep ( in  inpCVec,
in  sepStr 
)

SEPCELLSTRBYSEP splits elements of input cell column vector of strings using a specified separator and returns result as a cell matrix of strings, it is assumes that each element is splitted to an equal number of parts.

*  Input:
*    regular:
*        inpCMat: cell[nRows,1] of char[1,] - cell vector of strings
*        sepStr: char[1,] - separator
* 
*  Output:
*    outCMat: cell[nRows,nCols] of char[1,] - cell matrix of strings
* 
*  Note: this function is an inversion of catcellstrwithsep
* 
Author
Peter Gagarinov, PhD pgaga.nosp@m.rino.nosp@m.v@gma.nosp@m.il.c.nosp@m.om

◆ shortcapstr()

function mxberry::core::string::shortcapstr ( in  longName)
Author
Peter Gagarinov, PhD pgaga.nosp@m.rino.nosp@m.v@gma.nosp@m.il.c.nosp@m.om

◆ splitpart()

function mxberry::core::string::splitpart ( in  inpStr,
in  delimStr,
in  fieldNum 
)

SPLITPART splits string on delimiter and return the given field (counting from one)

*  Input:
*    regular:
*        inpStr: char[1,] - string to be splitted
*        delimStr: char[1,] - delimiter
*        fieldNum: numeric[1,1]/char[1,] - number of field to return, if
*           char, can have one of the following values:
*                'first' - take the first field
*                'last' - take the last field
* 
*  Output:
*    resStr: char[1,]
* 
Author
Peter Gagarinov, PhD pgaga.nosp@m.rino.nosp@m.v@gma.nosp@m.il.c.nosp@m.om