日期:2014-05-18  浏览次数:20406 次

LastIndexOf简单的送分问题?
怎么得到比如“12/sdsd/88”
最后一个“/”后面的88

------解决方案--------------------
LastIndexOf.Substring(str.LastIndexOf( "/ "))
------解决方案--------------------
substring(LastIndexOf( "// "),Length)
------解决方案--------------------
string str = "2/sdsd/88 ";
string tt = str.Substring(str.LastIndexOf( "\\ "));
------解决方案--------------------
string a = "12/sdsd/88 ";

string b = a.Substring(a.LastIndexOf( '/ ') + 1 ,a.Length - a.LastIndexOf( '/ ') -1);

Response.Write(b);
------解决方案--------------------
str = str.Substring(str.LastIndexOf( "/ ")+1);

------解决方案--------------------
int_A=LastIndexOf(the_str, "/ ")

有了这个 int_A 后面的就好办了。
------解决方案--------------------
try


string test = "12/sdsd/88 ";
string result = System.IO.Path.GetFileNameWithoutExtension(test);

------解决方案--------------------
str.Substring(str.LastIndexOf( "/ "))