Go Back   Gaming Gutter > Non-Gaming > Programming > Source Code


Source Code - Have a source code/project files you want to post? Do so here.

» Site Navigation
» Home
» FAQ
» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Advertisement
» Recent Threads
Go to first new post Plastic Surgery Hell
Today 08:02 PM
by Li-Shun
Last post by Lifeandlifeonly
Today 09:06 PM
9 Replies, 22 Views
Go to first new post Lil Wayne
10-21-2008 09:33 PM
Last post by smokey
Today 09:02 PM
41 Replies, 331 Views
Go to first new post The best browser
11-13-2008 06:35 PM
Last post by azn fingers
Today 08:54 PM
59 Replies, 353 Views
Go to first new post Selling Tons of Legit...
07-17-2008 06:47 PM
by Crim
Last post by ebilbish
Today 08:51 PM
432 Replies, 4,744 Views
Go to first new post What's your weather?
11-08-2008 04:43 PM
by reirei
Last post by azn fingers
Today 08:51 PM
58 Replies, 355 Views
Reply
 
LinkBack Thread Tools Display Modes

 [C++] Replace All
Old 09-20-2008, 04:19 PM   #1 (permalink)

Male |G3| is online now

 
|G3|'s Avatar
 
Join Date: Feb 2007
Posts: 3,781
GPoints: 6,414
iTrader: 9 / 100%
|G3| Is a Subordinate to Kyo|G3| Is a Subordinate to Kyo|G3| Is a Subordinate to Kyo|G3| Is a Subordinate to Kyo|G3| Is a Subordinate to Kyo|G3| Is a Subordinate to Kyo|G3| Is a Subordinate to Kyo
Rep Power: 21
[C++] Replace All

This will go through a string and replace all the occurrences.

Code:
string ReplaceAllG(string strSrc, string strSearch, string strReplace){
    size_t start, end = 0, sizeSearch = strSearch.size();
    while((start = strSrc.find(strSearch, end))!=string::npos){
        end = start + sizeSearch;
        strSrc.replace(start, sizeSearch, strReplace);
    }
    return strSrc;
}
__________________
proxy sites | proxy | web proxy | glype proxy
GAIA FLP GENERATOR


Thanks Hatz ;3


Last edited by |G3|; 11-09-2008 at 05:49 AM.
  Reply With Quote
Reply

Bookmarks



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Powered by vBadvanced CMPS v3.0 RC2

All times are GMT -7. The time now is 09:06 PM.


vBulletin skin developed by: eXtremepixels
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The contents of this webpage are copyright © 2006-2008 GamingGutter.com. All Rights Reserved.

Page generated in 0.08567095 seconds (100.00% PHP - 0% MySQL) with 19 queries