function C=strSplit(str,loc,trim)
% strSplit <Split string at given location.>
% Usage:: C=strSplit(str,loc,trim[0])
%

% revision history:
% 04/24/16 Mark D. Shattuck <mds> strSplit.m

%% Parse Input
if(~exist('trim','var') || isempty(trim))
	trim=0;
end
trim=clip(trim,0,1);

%% Main

idx=num2cell([1 loc+trim;loc-1 length(str)],1);


C=cellfun(@(x) str(x(1):x(2)),idx,'uniformoutput',false);


