Commit 4f0a4d06 authored by Tyler Collins's avatar Tyler Collins
Browse files

Help documentation added to file_strswap

parent eed30957
% file_strswap() - Execute a string swap on a given file based on passed varargs.
% Functions as a find and replace in a given file.
% Usage:
% >> newstr = file_strswap(fname, varargin)
%
% Required Inputs:
% fname = File name to execute swaps on. This function opens the file
% internally.
%
% Optional Inputs:
% Any given pair of strings to swap. See Batch Context documentation for
% proper syntactical usage.
%
% Outputs:
% swapstr = Updated output in which instances of key strings have
% been swapped with their respective val strings.
%
% See also: pop_runhtb(), key_strswap()
% Copyright (C) 2017 Brock University Cognitive and Affective Neuroscience Lab
%
% Code written by James A. Desjardins, Allan Campopiano, and Andrew Lofts
%
% This program is free software; you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation; either version 2 of the License, or
% (at your option) any later version.
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this program (LICENSE.txt file in the root directory); if not,
% write to the Free Software Foundation, Inc., 59 Temple Place,
% Suite 330, Boston, MA 02111-1307 USA
function swapstr=file_strswap(fname,varargin)
for i=1:length(varargin)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment