<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: str_replace for C	</title>
	<atom:link href="https://www.binarytides.com/str_replace-for-c/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.binarytides.com/str_replace-for-c/</link>
	<description>News, Technology, Entertainment and more</description>
	<lastBuildDate>Mon, 12 Nov 2012 19:03:13 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>
	<item>
		<title>
		By: Jürgen		</title>
		<link>https://www.binarytides.com/str_replace-for-c/comment-page-1/#comment-65277</link>

		<dc:creator><![CDATA[Jürgen]]></dc:creator>
		<pubDate>Mon, 12 Nov 2012 19:03:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=1262#comment-65277</guid>

					<description><![CDATA[c = ( strlen(replace) - search_size )*c + strlen(subject);
	
	//New subject with new size
	new_subject = malloc( c );

Hallo
This source is listed in Google so please correct

If replace is shorter then search you get a negativ size --&#062; segfault
Check for nothing to replace.
Free the old subject.

By the way, i think strcat is easier then the strncpy way.

Jürgen]]></description>
			<content:encoded><![CDATA[<p>c = ( strlen(replace) &#8211; search_size )*c + strlen(subject);</p>
<p>	//New subject with new size<br />
	new_subject = malloc( c );</p>
<p>Hallo<br />
This source is listed in Google so please correct</p>
<p>If replace is shorter then search you get a negativ size &#8211;&gt; segfault<br />
Check for nothing to replace.<br />
Free the old subject.</p>
<p>By the way, i think strcat is easier then the strncpy way.</p>
<p>Jürgen</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Silver Moon		</title>
		<link>https://www.binarytides.com/str_replace-for-c/comment-page-1/#comment-65276</link>

		<dc:creator><![CDATA[Silver Moon]]></dc:creator>
		<pubDate>Wed, 13 Jun 2012 11:47:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=1262#comment-65276</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/str_replace-for-c/comment-page-1/#comment-65275&quot;&gt;wakyelmadno&lt;/a&gt;.

why do we need to insert that. inserting new_subject=&#039;&#039; in line 63 will erase the new string.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/str_replace-for-c/comment-page-1/#comment-65275">wakyelmadno</a>.</p>
<p>why do we need to insert that. inserting new_subject=&#8221; in line 63 will erase the new string.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: wakyelmadno		</title>
		<link>https://www.binarytides.com/str_replace-for-c/comment-page-1/#comment-65275</link>

		<dc:creator><![CDATA[wakyelmadno]]></dc:creator>
		<pubDate>Wed, 13 Jun 2012 10:50:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=1262#comment-65275</guid>

					<description><![CDATA[Thanks for the function.

Buf we need insert this new_subject[p-old] = &#039;&#039;; in line 53 and new_subject[c][/c]=&#039;&#039;; in line 63]]></description>
			<content:encoded><![CDATA[<p>Thanks for the function.</p>
<p>Buf we need insert this new_subject[p-old] = &#8221;; in line 53 and new_subject[c][/c]=&#8221;; in line 63</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
