You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: bcReform.m
    path of file: ./repos/chebfun/@chebgui
    
    the code of the file until where you have to start completion: function bcOut = bcReform(dom, bcInput, isIorF)
%BCREFORM    Convert a general BC from chebgui to IVP/FVP form
%
% BCOUT = BCREFORM(DOM, BCINPUT, ISIORF), where
%
%   DOM:     The domain that the problem is specified.
%   BCINPUT: The input from the BC field of CHEBGUI.

    
function bcOut = bcReform(dom, bcInput, isIorF)
%BCREFORM    Convert a general BC from chebgui to IVP/FVP form
%
% BCOUT = BCREFORM(DOM, BCINPUT, ISIORF), where
%
%   DOM:     The domain that the problem is specified.
%   BCINPUT: The input from the BC field of CHEBGUI.
%   ISIORF:  Is equal to 1 if we're solving an initial value problem, and 2
%            if we're solving a final value problem.
%
% returns
%   BCOUT:   Boundary conditions that can be assigned to the LBC or RBC field of
%            a chebop.
%
% This method is used for converting input that usually would be assigned to
% the BC field of a chebop to form that can be assigned to the LBC or RBC field.
% It is required since in CHEBGUI, we specify conditions for ODEs on the format 
%   u(0) = 1,
% which can then be imposed via 
%   N.bc = @(x,u) u(0) - 1;
% On the other hand, for IVPs/FVPs, the format
%   u = 1
% is more useful, since that can then be imposed via
%   N.lbc = @(u) u;

% Find where whitespace and commas appear in the domain string, so that we can
% determine what the end