Talk:Trimming (computer programming): Difference between revisions

Content deleted Content added
Keep the functions. Remove just code: - No flamewar intended or exists.
No edit summary
Line 6:
 
:: I've changed the code for the C example. I believe the old example would have leaked memory - for processing large amounts of data, this could cause problems! On a side note, could someone check to make sure I haven't done something dumb while writing this (it compiled and worked in VC++) --[[User:Portej|Portej]] 07:29, 26 September 2007 (UTC)
 
::: At least for me the example in C does '''NOT''' work. i doubled checked it, but still believe, that i did not make a mistake. the problematic section is shown below. this causes a segmentation fault in my environment (gcc-4.1.3). --[[User:Alex.blackbit|Alex.blackbit]] 18:32, 1 November 2007 (UTC)
<source lang="c">
if (last != input)
last[1] = 0;
</source>
 
----
 
in AWK better to use those command: