This is a static copy of a profile reportHome
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)
Lines where the most time was spent
No measurable time spent in this functionLine Number | Code | Calls | Total Time | % Time | Time Plot |
475 | if (~isempty(badChars)) | 40 | 0 s | 0% |  |
474 | badChars = find((out < 32) ... | 40 | 0 s | 0% |  |
473 | out = strrep(out, char(13), ch... | 40 | 0 s | 0% |  |
472 | out = strrep(out, char([13 10]... | 40 | 0 s | 0% |  |
471 | out = in; | 40 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0 s | 0% | |
Children (called functions)
No childrenCode Analyzer results
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 20 |
Non-code lines (comments, blank lines) | 9 |
Code lines (lines that can run) | 11 |
Code lines that did run | 6 |
Code lines that did not run | 5 |
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