Home > freetb4matlab > strings > substr.m

substr

PURPOSE ^

% Return the substring of @var{s} which starts at character number

SYNOPSIS ^

function t = substr (s, offset, len)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {} substr (@var{s}, @var{offset}, @var{len})
% Return the substring of @var{s} which starts at character number
% @var{offset} and is @var{len} characters long.
%
% If @var{offset} is negative, extraction starts that far from the end of
% the string.  If @var{len} is omitted, the substring extends to the end
% of S.
%
% For example,
%
% @example
% @group
% substr ('This is a test string', 6, 9)
%      @result{} 'is a test'
% @end group
% @end example
%
% This function is patterned after AWK.  You can get the same result by
% @code{@var{s}(@var{offset} : (@var{offset} + @var{len} - 1))}.
% @end deftypefn

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Sat 16-May-2009 00:04:49 by m2html © 2003