CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2002
    Posts
    16

    Question Unicode character????

    Hi!!

    I want to use the LastIndexOf method of the class string. This methods takes as first input parameter a Unicode character. I want to use this function to find the character '\' of a path name. Does anyone know how to pass the character '\' to this method???

    Many thanks in advance!!

  2. #2
    Join Date
    Dec 2000
    Location
    Slovakia
    Posts
    1,043
    Code:
    int nIndex = strFullFileName.LastIndexOf('\\');
    string sFilePath = strFullFileName.Substring(0, nIndex);
    string sFileName = strFullFileName.Substring(nIndex+1);
    Last edited by MartinL; December 5th, 2002 at 05:23 AM.

  3. #3
    Join Date
    Oct 2002
    Posts
    16
    Many thanks!!!
    that works!!! exactly what I want!!!

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured