将一个文件名保存在一个字符串里,怎么将该文件名的主文件名和扩展名分离?(100分)
如:
CString str="abc.txt";
CString a,b;
a=prefix(str);
b=postfix(str);
要求结果a="abc",b="txt",有没有这样的函数呢?
如:
CString str="abc.txt";
CString a,b;
a=prefix(str);
b=postfix(str);
要求结果a="abc",b="txt",有没有这样的函数呢?
Left ------Extracts the left part of a string (like the Basic LEFT$ function).
Right ------Extracts the right part of a string (like the Basic RIGHT$ function).
SpanIncluding ------Extracts a substring that contains only the characters in a set.
SpanExcluding
b=str.Mid(str.Find(".")+1);