<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>
<channel>
	<title>kwatog &#38; co.&#187; replace</title>
	<atom:link href="http://kwatog.com/tag/replace/feed/" rel="self" type="application/rss+xml" />
	<link>http://kwatog.com</link>
	<description>tech notes and general nonsense</description>
	<lastBuildDate>Tue, 31 Jan 2012 06:27:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>String Replace in C++</title>
		<link>http://kwatog.com/blog/uncategorized/string-replace-in-c/</link>
		<comments>http://kwatog.com/blog/uncategorized/string-replace-in-c/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 10:43:24 +0000</pubDate>
		<dc:creator>kwatog</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[replace]]></category>
		<category><![CDATA[string]]></category>
		<guid isPermaLink="false">http://kwatog.com/?p=160</guid>
		<description><![CDATA[As I&#8217;m just a C++ poser, I don&#8217;t know a lot of things programming in this language especially if I have to deal with STL (Standard Template Library). As some of you know, when you&#8217;re not using third party libraries in C++, programming gets a little harder (note : my harder is harder than your [...]]]></description>
			<content:encoded><![CDATA[<p>As I&#8217;m just a C++ poser, I don&#8217;t know a lot of things programming in this language especially if I have to deal with STL (Standard Template Library). As some of you know, when you&#8217;re not using third party libraries in C++, programming gets a little harder (<em>note : my harder is harder than your harder</em>). </p>
<p>So I searched the web and found this solution. Unfortunately, I forgot where I got this. Anyway, the original program doesn&#8217;t work.</p>
<p><code>#include <string><br />
#include <iostream></p>
<p>using namespace std;</p>
<p>int main()<br />
{<br />
    string str( "The Horse and the Yokaba" );<br />
    string searchString( "Yokaba" );<br />
    string replaceString( "Kabayo" );</p>
<p>    string::size_type pos = 0;<br />
    while ( (pos = str.find(searchString, pos)) != string::npos ) {<br />
        str.replace( pos, searchString.size(), replaceString );<br />
        pos++;<br />
    }<br />
    cout << str << endl;<br />
    return 0;<br />
}<br />
</code></p>
<p>When I'm using the MString library, it was a breeze. There's a ton of methods that makes things easy but when you need to make your program faster and leaner, you wouldn't want the extra baggage that comes with a third party library. MString is good but it's just brings with it too much things I don't need on my program. </p>
<p>If I have time(which most of the time I spend sleeping), I'll update the post to include a line by line explanation. It's not exactly for you but for me. It's a note to myself. <img src='http://kwatog.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Ciao!</p>
<h4>Incoming search terms:</h4><ul><li>string replace in c</li><li>string replace c</li><li>StringReplace c</li></ul>]]></content:encoded>
			<wfw:commentRss>http://kwatog.com/blog/uncategorized/string-replace-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux Search and Replace in File</title>
		<link>http://kwatog.com/blog/linux/linux-search-and-replace-in-file/</link>
		<comments>http://kwatog.com/blog/linux/linux-search-and-replace-in-file/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 05:16:32 +0000</pubDate>
		<dc:creator>kwatog</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[replace]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[sed]]></category>
		<guid isPermaLink="false">http://kwatog.com/?p=85</guid>
		<description><![CDATA[Here&#8217;s the syntax sed 's/SEARCH_TEXT/REPLACE_TEXT/g' FILENAME > OUTFILE SEARCH_TEXT is the text to search in filename REPLACE TEXT is the string to be put in place of SEARCH_TEXT FILENAME is the file to be searched OUTFILE is the file where the output Sample sed 's/ORDER/VANTIVE_ORDER/g' kwatogtest.sql > kwatogsed.log I keep on forgetting that syntax although [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s the syntax</p>
<p><code><br />
sed 's/SEARCH_TEXT/REPLACE_TEXT/g' FILENAME > OUTFILE</code><br />
SEARCH_TEXT is the text to search in filename<br />
REPLACE TEXT is the string to be put in place of SEARCH_TEXT<br />
FILENAME is the file to be searched<br />
OUTFILE is the file where the output</p>
<p>Sample<br />
<code><br />
sed 's/ORDER/VANTIVE_ORDER/g' kwatogtest.sql > kwatogsed.log<br />
</code></p>
<p>I keep on forgetting that syntax although it&#8217;s so simple. There might other ways of doing it but as of now, it&#8217;s the only way I know. :p</p>
<h4>Incoming search terms:</h4><ul><li>glendale web design</li></ul>]]></content:encoded>
			<wfw:commentRss>http://kwatog.com/blog/linux/linux-search-and-replace-in-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!--
Hyper cache file: be7be1d1d755d3554b0fdb2ede590f86
Cache created: 05-02-2012 02:42:00
HCE Version: 0.9.8
Load AVG: 0.02(5)
-->
