Click here to Skip to main content
15,892,797 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalbest way to replace items in a string Pin
tbbooher19-Mar-02 9:55
tbbooher19-Mar-02 9:55 
GeneralRe: best way to replace items in a string Pin
Mazdak19-Mar-02 10:27
Mazdak19-Mar-02 10:27 
GeneralRe: best way to replace items in a string Pin
Tim Smith19-Mar-02 10:43
Tim Smith19-Mar-02 10:43 
GeneralRe: best way to replace items in a string Pin
Nish Nishant19-Mar-02 13:36
sitebuilderNish Nishant19-Mar-02 13:36 
GeneralRe: best way to replace items in a string Pin
Tim Smith19-Mar-02 13:48
Tim Smith19-Mar-02 13:48 
GeneralRe: best way to replace items in a string Pin
tbbooher20-Mar-02 7:29
tbbooher20-Mar-02 7:29 
GeneralRe: best way to replace items in a string Pin
Tim Smith20-Mar-02 7:35
Tim Smith20-Mar-02 7:35 
GeneralRe: best way to replace items in a string Pin
Tim Smith20-Mar-02 7:42
Tim Smith20-Mar-02 7:42 
Just for an FYI, here is how your routine would look for C strings.

void CleanUpWord (char *pszWord)
{
    char *pszIn = pszWord;
    char *pszOut = pszWord;
    char c;
    while ((c = *pszIn++) != 0)
    {
        if (!ispunct (c))
            *pszOut++ = tolower (c);
    }
    *pszOut++;
}



Tim Smith

I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
GeneralRe: best way to replace items in a string Pin
Mazdak19-Mar-02 10:56
Mazdak19-Mar-02 10:56 
GeneralRe: best way to replace items in a string Pin
dazinith19-Mar-02 11:00
dazinith19-Mar-02 11:00 
GeneralRe: best way to replace items in a string Pin
Joaquín M López Muñoz19-Mar-02 11:50
Joaquín M López Muñoz19-Mar-02 11:50 
QuestionSuggestions on Using Grids? Pin
dazinith19-Mar-02 9:08
dazinith19-Mar-02 9:08 
AnswerRe: Suggestions on Using Grids? Pin
Tomasz Sowinski19-Mar-02 9:19
Tomasz Sowinski19-Mar-02 9:19 
AnswerRe: Suggestions on Using Grids? Pin
alex.barylski19-Mar-02 9:52
alex.barylski19-Mar-02 9:52 
GeneralRe: Suggestions on Using Grids? Pin
dazinith19-Mar-02 10:31
dazinith19-Mar-02 10:31 
QuestionDynamic array??? Possible??? Pin
19-Mar-02 8:25
suss19-Mar-02 8:25 
AnswerRe: Dynamic array??? Possible??? Pin
Paul M Watt19-Mar-02 8:42
mentorPaul M Watt19-Mar-02 8:42 
AnswerRe: Dynamic array??? Possible??? Pin
Tomasz Sowinski19-Mar-02 8:49
Tomasz Sowinski19-Mar-02 8:49 
AnswerRe: Dynamic array??? Possible??? Pin
Nemanja Trifunovic19-Mar-02 8:49
Nemanja Trifunovic19-Mar-02 8:49 
AnswerRe: Dynamic array??? Possible??? Pin
dazinith19-Mar-02 9:00
dazinith19-Mar-02 9:00 
GeneralRe: Dynamic array??? Possible??? Pin
Christian Graus19-Mar-02 10:22
protectorChristian Graus19-Mar-02 10:22 
QuestionHow to create global variable? Pin
19-Mar-02 7:49
suss19-Mar-02 7:49 
AnswerRe: How to create global variable? Pin
Carlos Antollini19-Mar-02 7:51
Carlos Antollini19-Mar-02 7:51 
AnswerRe: How to create global variable? Pin
Paul M Watt19-Mar-02 8:07
mentorPaul M Watt19-Mar-02 8:07 
GeneralRe: How to create global variable? Pin
Tomasz Sowinski19-Mar-02 8:11
Tomasz Sowinski19-Mar-02 8:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.