CString Replace question
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: CString Replace question

  1. #1
    Join Date
    Jul 2002
    Posts
    372

    CString Replace question

    Hi ...

    Currently I'm using CString::Replace and it's working fine.
    Problem is that I'm doing it 10 times on the same string (very long one).

    So what I'm looking for is a way to find\replace from a given position.
    Any ideas ?

    Thanks a lot

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,011

    Re: CString Replace question

    Something like (pseudo-code!):
    Code:
    CString strOriginal;
    ...
    int iPosition = ...;
    ...
    CString strAfterPosition = strOriginal.Mid(iPosition);
    strAfterPosition.Replace(...);
    strOriginal = strOriginal.Left(iPosition) + strAfterPosition;
    Victor Nijegorodov

  3. #3
    Join Date
    Jul 2002
    Posts
    372

    Re: CString Replace question

    Interesting .. I'll test this code soon.
    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center