%% Insert Text After Position in Character Vector
% Create a character vector and insert text after a specified position.

chr = 'mushrooms and onions'

%
% Insert text after the ninth position.

newChr = insertAfter(chr,9,', peppers,')

%
% Insert text after a substring.

newChr = insertAfter(chr,'mushrooms',', peppers,')

% Copyright 2012 The MathWorks, Inc.