function S = extractBefore(STR, varargin)
%EXTRACTBEFORE Create a string from part of a larger string.
%   S = EXTRACTBEFORE(STR, END)
%   
%   Limitations:
%   Pattern objects are not supported.
%   
%   See also EXTRACTBEFORE, codistributed/STRING.
%   


%   Copyright 2016-2020 The MathWorks, Inc.

narginchk(2, 2);
% PATTERN is currently not supported
matlab.bigdata.internal.util.errorIfPatternInput('distributed', STR, varargin{:})
S = codistributed.pElementwiseUnaryOp(@extractBefore, STR, varargin{:});
