Cstring截取字段
来源:互联网 发布:通用网址和中文域名 编辑:程序博客网 时间:2024/05/18 00:47
例程1:(csdn)
文件xxxx.dll去掉后面的.dll
char str[] = "xxxx.dll"
char*p;
p=strrchr(str, '.');
*p = 0;
CString str="xxxx.dll";
int n = str.ReverseFind('.')
str = str.Left(str.GetLength()-n-1);
CString m_char,m_disp;
m_disp="jadfueiuajdf?";
m_char="?";
if (!m_char.IsEmpty())
{
int index = m_disp.Find(m_char);
m_disp = m_disp.Right(m_disp.GetLength()-index-1);
}
CString temp=the.m_bb;
CString reslut=temp.Left(temp.Find("?")-1);
CString m_StrReceiveModem;
int nPos = m_StrReceiveModem.Find('$');
if(nPos >= 0)
{
CString sSubStr = m_StrReceiveModem.Mid(nPos);//
}
CString m_StrReceiveModem;
int nPos = m_StrReceiveModem.Find('$');
if(nPos >= 0)
{
CString sSubStr = m_StrReceiveModem.Right(StrReceiveModem.GetLength()-nPos);
}
}
//截取“$”到“#”的字符串
int first,last;
first= m_StrReceiveModem.Find("$");
last= m_StrReceiveModem.Find("#");
CString sSubStr = m_StrReceiveModem.Mid(first,last);
例程4: (fox)
- Cstring截取字段
- CString 截取
- CString 截取
- CString截取
- CString 截取字符串
- cstring 截取字符串
- cstring 截取字符串
- CString截取字串方法
- CString字符串截取
- CString 字符串截取
- CString截取字串方法
- CString截取字串方法
- CString字符串截取
- CString的截取
- CString截取字符串
- CString截取字串方法
- CString 截取字符串全攻略
- CString截取字符串全攻略
- 从js数组中随机取值
- 机房收费系统之导出Excel
- 测试
- muduo网络库学习之EventLoop(四):EventLoopThread 类、EventLoopThreadPool 类
- 浅析CentOS和RedHat Linux的区别
- Cstring截取字段
- 1108
- Row_Number() 分组排序
- linux下上传下载命令SFTP ,FTP
- 树莓派(Raspberry Pi):完美的家用服务器
- 完美匹配中文的Php正则表达式
- Notpad++ json插件的使用
- 飞机模型
- Tree NOIp2013-Training Series #4