StringMatch:

Path: Common/General

% Finds which elements of sA match s
 Uses strcmp and strcmpi internally. An alternative to strmatch which is no
 longer recommended by MathWorks.
  
 Type StringMatch for a demo

--------------------------------------------------------------------------
   Form:
   k = StringMatch(s,sA,~)
--------------------------------------------------------------------------

   -------
   Inputs
   -------
   s     (1,:) String
   sA    {:}   Cell array of strings
   nC    (1,1) If entered, ignore case

   -------
   Outputs
   -------
   k    (1,:)  Elements of sA that match s

--------------------------------------------------------------------------

Back to the Common Module page