CString str = _T("Duration: 00:04:12.27,");
int start = str.Find("Duration:") + strlen("Duration:");
int end = str.Find(",",start);
CString time = str.Mid(start,end-start);
MessageBox(time);
效果如下
标签:end,Duration,int,截取,CString,C++,start,str,字符串 From: https://blog.51cto.com/u_13316945/5831967