Home > freetb4matlab > strings > validatestring.m

validatestring

PURPOSE ^

% Verify that @var{str} is a string or substring of an element of

SYNOPSIS ^

function str = validatestring (str, strarray, varargin)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {@var{validstr} =} validatestring (@var{str}, @var{strarray})
% @deftypefnx {Function File} {@var{validstr} =} validatestring (@var{str}, @var{strarray}, @var{funcname})
% @deftypefnx {Function File} {@var{validstr} =} validatestring (@var{str}, @var{strarray}, @var{funcname}, @var{varname})
% @deftypefnx {Function File} {@var{validstr} =} validatestring (@dots{}, @var{position})
% Verify that @var{str} is a string or substring of an element of
% @var{strarray}.
%
% @var{str} is a character string to be tested, and @var{strarray} is a
% cellstr of valid values.  @var{validstr} will be the validated form
% of @var{str} where validation is defined as @var{str} being a member
% or substring of @var{validstr}.  If @var{str} is a substring of
% @var{validstr} and there are multiple matches, the shortest match
% will be returned if all matches are substrings of each other, and an
% error will be raised if the matches are not substrings of each other.
%
% All comparisons are case insensitive.
% @seealso{strcmp, strcmpi}
% @end deftypefn

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 22-May-2009 15:13:00 by m2html © 2003