CString::ReverseFind in String

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?VG9tYXM=?=

    #1

    CString::ReverseFind in String

    Hello all.

    Is there some class similar to CString::Revers eFind(...) in .NET?.

    // Example for CString::Revers eFind
    CString s( "abcabc" );
    ASSERT( s.ReverseFind( 'b' ) == 4 );

    Thanks
    --
    Tomas
  • Ben Voigt

    #2
    Re: CString::Revers eFind in String


    "Tomas" <Tomas@newsgrou p.nospamwrote in message
    news:D479666B-81BB-44E2-AE32-2644112FE748@mi crosoft.com...
    Hello all.
    >
    Is there some class similar to CString::Revers eFind(...) in .NET?.
    No, but the System::String class has a method LastIndexOf which accomplishes
    the same task as the CString::Revers eFind member function.
    >
    // Example for CString::Revers eFind
    CString s( "abcabc" );
    ASSERT( s.ReverseFind( 'b' ) == 4 );
    >
    Thanks
    --
    Tomas

    Comment

    • Jochen Kalmbach [MVP]

      #3
      Re: CString::Revers eFind in String

      Hi Tomas!
      Is there some class similar to CString::Revers eFind(...) in .NET?.
      >
      // Example for CString::Revers eFind
      CString s( "abcabc" );
      ASSERT( s.ReverseFind( 'b' ) == 4 );
      String::LastInd exOf !?

      --
      Greetings
      Jochen

      My blog about Win32 and .NET

      Comment

      • =?Utf-8?B?VG9tYXM=?=

        #4
        Re: CString::Revers eFind in String

        And a method to do this?

        // example for CString::Left
        CString s( _T("abcdef") );
        ASSERT( s.Left(2) == _T("ab") );


        Comment

        • Jochen Kalmbach [MVP]

          #5
          Re: CString::Revers eFind in String

          Hi Tomas!
          And a method to do this?
          >
          // example for CString::Left
          CString s( _T("abcdef") );
          ASSERT( s.Left(2) == _T("ab") );
          The simplest would be to look at the docu...

          =String.SubStri ng

          --
          Greetings
          Jochen

          My blog about Win32 and .NET

          Comment

          • Jeffrey Tan[MSFT]

            #6
            Re: CString::Revers eFind in String

            Hi Tomas,

            Yes, the string handling in .Net is accomplished through System.String
            class. The link below contains all the methods/properties of System.String
            class, so you may find whatever you want in it:
            http://msdn.microsoft.com/library/de...us/cpref/html/
            frlrfSystemStri ngMembersTopic. asp

            Hope this helps.

            Best regards,
            Jeffrey Tan
            Microsoft Online Community Support
            =============== =============== =============== =====
            Get notification to my posts through email? Please refer to
            http://msdn.microsoft.com/subscripti...ult.aspx#notif
            ications.

            Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
            where an initial response from the community or a Microsoft Support
            Engineer within 1 business day is acceptable. Please note that each follow
            up response may take approximately 2 business days as the support
            professional working with you may need further investigation to reach the
            most efficient resolution. The offering is not appropriate for situations
            that require urgent, real-time or phone-based interactions or complex
            project analysis and dump analysis issues. Issues of this nature are best
            handled working with a dedicated Microsoft Support Engineer by contacting
            Microsoft Customer Support Services (CSS) at
            http://msdn.microsoft.com/subscripti...t/default.aspx.
            =============== =============== =============== =====
            This posting is provided "AS IS" with no warranties, and confers no rights.

            Comment

            Working...