This is a static copy of a profile report

Home

imagesci/private/writepng>CheckTextItem (40 calls, 0.000 sec)
Generated 05-Aug-2011 13:03:43 using cpu time.
subfunction in file /usr/local/MATLAB/R2011a/toolbox/matlab/imagesci/private/writepng.m
Copy to new window for comparing multiple runs

Parents (calling functions)

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

Line NumberCodeCallsTotal Time% TimeTime Plot
475
if (~isempty(badChars))
400 s0%
474
badChars = find((out < 32) ...
400 s0%
473
out = strrep(out, char(13), ch...
400 s0%
472
out = strrep(out, char([13 10]...
400 s0%
471
out = in;
400 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 function20
Non-code lines (comments, blank lines)9
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
460 function out = CheckTextItem(in)
461 %CheckTextItem
462 % out = CheckTextItem(in) strips out control characters from text; PNG spec
463 % discourages them. It also replaces [13 10] by 10; then it replaces 13
464 % by 10. The PNG spec says newlines must be represented by a single 10.
465
40 466 if (~ischar(in))
467 error('MATLAB:writepng:invalidTextChunk', ...
468 'Text chunk must be a string.');
469 end
470
40 471 out = in;
40 472 out = strrep(out, char([13 10]), char(10));
40 473 out = strrep(out, char(13), char(10));
40 474 badChars = find((out < 32) & (out ~= 10));
40 475 if (~isempty(badChars))
476 warning('MATLAB:writepng:changedTextChunk', ...
477 'Stripping control characters from text chunk.');
478 out(badChars) = [];
479 end