This is a static copy of a profile report

Home

strfun/private/strescape (Calls: 2, Time: 0.000 s)
Generated 16-Jul-2020 17:09:47 using performance time.
function in file /Applications/MATLAB_R2020a.app/toolbox/matlab/strfun/private/strescape.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
strjoinfunction2
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
20
while idx < length(str)
20.000 s29.1%
29
end
20.000 s0.5%
14
if iscell(str)
20.000 s0.1%
16
else
20.000 s0.1%
27
end
20.000 s0.1%
All other lines  0.000 s70.2%
Totals  0.000 s100% 
Children (called functions)
No children
Code Analyzer results
Line numberMessage
Coverage results
Show coverage for parent directory
Total lines in function29
Non-code lines (comments, blank lines)16
Code lines (lines that can run)13
Code lines that did run6
Code lines that did not run7
Coverage (did run/can run)46.15 %
Function listing
time 
Calls 
 line
   1 
function str = strescape(str)
   2 
%STRESCAPE  Escape control character sequences in a string.
   3 
%   STRESCAPE(STR) converts the escape sequences in a string to the values
   4 
%   they represent.
   5 
%
   6 
%   Example:
   7 
%
   8 
%       strescape('Hello World\n')
   9 
%
  10 
%   See also SPRINTF.
  11 

  12 
%   Copyright 2012-2015 The MathWorks, Inc.
  13 

< 0.001 
      2 
  14
if iscell(str) 
  15 
    str = cellfun(@(c)strescape(c), str, 'UniformOutput', false);
< 0.001 
      2 
  16
else 
< 0.001 
      2 
  17
    idx = 1; 
  18 
    % Note that only [1:end-1] of the string is checked,
  19 
    % since unescaped trailing backslashes are ignored.
< 0.001 
      2 
  20
    while idx < length(str) 
  21 
        if str(idx) == '\'
  22 
            str(idx) = [];  % Remove the '\' escape character itself.
  23 
            str(idx) = escapeChar(str(idx));
  24 
        end
  25 
        idx = idx + 1;
  26 
    end
< 0.001 
      2 
  27
end 
  28 

< 0.001 
      2 
  29
end 

Other subfunctions in this file are not included in this listing.