This is a static copy of a profile report

Home

imagesci/private/writepng>CheckTextItem (3 calls, 0.000 sec)
Generated 14-Nov-2016 07:47:24 using cpu time.
subfunction in file /usr/local/MATLAB/MATLAB_Production_Server/R2015a/toolbox/matlab/imagesci/private/writepng.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
imagesci/private/writepngfunction3
Lines where the most time was spent
No measurable time spent in this function

Line NumberCodeCallsTotal Time% TimeTime Plot
385
if (~isempty(badChars))
30 s0%
384
badChars = find((out < 32) ...
30 s0%
383
out = strrep(out, char(13), ch...
30 s0%
382
out = strrep(out, char([13 10]...
30 s0%
381
out = in;
30 s0%
All other lines  0 s0%
Totals  0 s0% 
Children (called functions)
No children
Code Analyzer results
Line numberMessage
Coverage results
Show coverage for parent directory
Total lines in function18
Non-code lines (comments, blank lines)7
Code lines (lines that can run)11
Code lines that did run6
Code lines that did not run5
Coverage (did run/can run)54.55 %
Function listing
time 
calls 
 line
 371 
function out = CheckTextItem(in)
 372 
%CheckTextItem
 373 
%   out = CheckTextItem(in) strips out control characters from text; PNG spec
 374 
%   discourages them.  It also replaces [13 10] by 10; then it replaces 13
 375 
%   by 10.  The PNG spec says newlines must be represented by a single 10.
 376 

      3 
 377 
if (~ischar(in)) 
 378 
    error(message('MATLAB:imagesci:writepng:invalidTextChunk'));
 379 
end
 380 

      3 
 381 
out = in; 
      3 
 382 
out = strrep(out, char([13 10]), char(10)); 
      3 
 383 
out = strrep(out, char(13), char(10)); 
      3 
 384 
badChars = find((out < 32) & (out ~= 10)); 
      3 
 385 
if (~isempty(badChars)) 
 386 
    warning(message('MATLAB:imagesci:writepng:changedTextChunk'));
 387 
    out(badChars) = [];
 388 
end