Click to See Complete Forum and Search --> : Unicode character????


simon29
December 4th, 2002, 09:56 AM
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!!

MartinL
December 5th, 2002, 04:19 AM
int nIndex = strFullFileName.LastIndexOf('\\');
string sFilePath = strFullFileName.Substring(0, nIndex);
string sFileName = strFullFileName.Substring(nIndex+1);

simon29
December 5th, 2002, 04:37 AM
Many thanks!!!
that works!!! exactly what I want!!!