删除模式串中出现的字符,如“welcome to asted”,模式串为“aeiou”那么得到的是“wlcm t std”。
#include
#include
using namespace std;
char *re(char *str,char *model)
{
if(str==NULL||model==NULL)
return NULL;
i...
分类:
其他好文 时间:
2014-09-02 12:27:44
阅读次数:
180
问题描述:判断字符ch是否与str所指字符串中的某个字符相同;若相同则什么也不做,若不同,则将其插入到字符串的最后。样例输入: abcde f样例输出: abcdef源码如下:#include#include#include#includevoid fun (char *str,char ch){....
分类:
其他好文 时间:
2014-09-02 12:08:54
阅读次数:
196
若对窗体控件label进行赋值 delegate void SetLabelText(int str);//定义委托,用来完成线程的赋值 /// /// 为label赋值 /// /// private void ...
分类:
编程语言 时间:
2014-09-02 11:49:54
阅读次数:
230
PHP将数据库内容转化为csv文件,以逗号隔开,为防止数据库内容中含有逗号,影响文件内容显示,需注意添加““(双引号)!!!
<?php
include “init.php”;
$file_name_=’file.csv’;
$str_content_=”aid,username,password,role,status,created_time,updated_time\n”;
fi...
分类:
数据库 时间:
2014-09-02 00:20:43
阅读次数:
233
1 static void Main(string[] args) 2 { 3 string[] str; 4 bool FLAG; 5 int n = 0, d = 0; 6 List...
分类:
其他好文 时间:
2014-09-01 19:09:13
阅读次数:
222
关键代码: /// /// 清除字符串内空格 /// /// 需要处理的字符串 /// 处理好后的字符串 public static string ExceptBlanks(this string str) { int _length = str.Lengt...
分类:
其他好文 时间:
2014-09-01 12:24:03
阅读次数:
242
还念C语言的我,MFC没法使用的C语言printf函数,于是:int MFCprintf(const char* m_data, ...){ CString str; char printf_buf[1024]; va_list args; /* args为定义的一个指向可变参数的变量,va_lis...
分类:
其他好文 时间:
2014-09-01 12:13:03
阅读次数:
382
/** * sql模糊查询特殊字符(\,%和_)处理 * * @param string $str * @return string */ public static function like_search_specialchars($str){ return str_rep...
分类:
数据库 时间:
2014-09-01 10:41:23
阅读次数:
261
正则表达式就是对字符串的操作: 匹配 ,查找,替换,分割。。1.php中常用的正则表达式相关的函数preg_match();preg_match_all();preg_replace()str_replace()preg_split()2.php的正则prel的语法什么贪婪,。。。等等
分类:
其他好文 时间:
2014-09-01 10:35:42
阅读次数:
205
在QT中进行串口通信时,很多情况要用到发送16进制的数据。从网上找来了一段代码测试能用: static QByteArray QString2Hex(QString str) { QByteArray senddata; int hexdata,lowhexdata; int h...
分类:
其他好文 时间:
2014-08-31 21:14:21
阅读次数:
177