Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bucanl_eeglab_extensions
Batch Context
Commits
4f0a4d06
Commit
4f0a4d06
authored
Sep 05, 2018
by
Tyler Collins
Browse files
Help documentation added to file_strswap
parent
eed30957
Changes
1
Hide whitespace changes
Inline
Side-by-side
batch/misc_func/file_strswap.m
View file @
4f0a4d06
% 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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment