This is a static copy of a profile report

Home

Function details for strfun/private/strescapeThis is a static copy of a profile report

Home

strfun/private/strescape (Calls: 3, Time: 0.001 s)
Generated 19-Jun-2021 04:39:08 using performance time.
function in file /nfs/linux/matlab-2019b/toolbox/matlab/strfun/private/strescape.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
strsplitfunction1
strfun/.../strescape>@(c)strescape(c)anonymous function1
strjoinfunction1
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
15
str = cellfun(@(c)strescape(c)...
10.001 s83.6%
14
if iscell(str)
30.000 s6.9%
20
while idx < length(str)
20.000 s2.9%
29
end
30.000 s1.9%
17
idx = 1;
20.000 s1.3%
All other lines  0.000 s3.4%
Totals  0.001 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
strfun/.../strescape>@(c)strescape(c)anonymous function10.000 s8.9%
Self time (built-ins, overhead, etc.)  0.001 s91.1%
Totals  0.001 s100% 
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 run7
Code lines that did not run6
Coverage (did run/can run)53.85 %
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 
      3 
  14
if iscell(str) 
  0.001 
      1 
  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 
      3 
  27
end 
  28 

< 0.001 
      3 
  29
end 

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