function newADCClockPrescalerPromptStr = calcADCModuleClockPrompt(ADCClockPrescaler, curADCClockPrescalerPromptStr)
%CALCADCMODULECLOCKPROMPT Summary of this function goes here
%   Detailed explanation goes here

% Copyright 2013-2018 The MathWorks, Inc.

ADCClockPrescaler = convertStringsToChars(ADCClockPrescaler);
curADCClockPrescalerPromptStr = convertStringsToChars(curADCClockPrescalerPromptStr);
if ischar(ADCClockPrescaler)
    ADCClockPrescaler = str2double(ADCClockPrescaler);
end

adclkps_divider_str = '\/\(ADCLKPS\*2\)\/';

if ADCClockPrescaler == 0
    newADCClockPrescalerPromptStr = regexprep(curADCClockPrescalerPromptStr, adclkps_divider_str, '\/');
else
    div_str_found = regexp(curADCClockPrescalerPromptStr, adclkps_divider_str, 'match');
    if isempty(div_str_found)
        newADCClockPrescalerPromptStr = regexprep(curADCClockPrescalerPromptStr, '\/', adclkps_divider_str);
    else
        newADCClockPrescalerPromptStr = curADCClockPrescalerPromptStr;
    end
end
