码迷,mamicode.com
首页 >  
搜索关键字:str    ( 67828个结果
字符内容转换
", $content); $content=str_replace(chr(32), "&nbsp", $content); $content=str_replace("[_[", "", $content); $content=str_replace("|_|", "&nbsp", $conte...
分类:其他好文   时间:2014-11-19 23:38:36    阅读次数:251
hdu1548——A strange lift
A strange lift Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 12230    Accepted Submission(s): 4656 Problem Description There is a str...
分类:其他好文   时间:2014-11-19 22:23:49    阅读次数:193
KMP求模式串在原串中出现的次数
#include #include #define maxn 10010 int next[maxn]; char str[maxn], buf[maxn * 100]; void getNext() { int i = 0, j = -1; next[i] = j; while(str[i]) { if(j == -1 || str[i] == str[j]) { ++...
分类:其他好文   时间:2014-11-19 22:16:01    阅读次数:176
PHP正则表达式实例汇总
$str = preg_replace("/()(.*?)()/", '\1\2\3', $str); 其中用了三个子模式(每个圆括号中内容为一个子模式),第一个是链接开始标签,第二个是链接文本,第三个是 然后第二个参数中\1、\2、\3就表示这三个部分获取任意的字符串$string中的所有链接地址...
分类:Web程序   时间:2014-11-19 22:03:49    阅读次数:267
【2014-11-19】字符串转化成整数
int StrToInt(const char* str) { long long num = 0; bool minus = false; if (str != NULL && *str != '\0') { if (*str == '+') str++; else i...
分类:其他好文   时间:2014-11-19 20:32:31    阅读次数:180
MD5加密算法
1 // MD5加密,32位 2 public static String MD5(String str) { 3 MessageDigest md5 = null; 4 try { 5 md5 = MessageDigest.get...
分类:编程语言   时间:2014-11-19 20:31:13    阅读次数:251
字符串 练习
//将“?文艺?青年”改成“213?青年”。 NSString *str = @"文艺青年"; NSString *str1 = [str stringByReplacingOccurrencesOfString:@"文艺" withString:@"213"]; NSLog(@"%@",str1....
分类:其他好文   时间:2014-11-19 20:17:45    阅读次数:203
hdu-1088
这是一道模拟题。 思路在代码的注释里面! 代码如下: #include #include using namespace std; int main() { char str[11111],a[111]; int cnt=0,now_len=0; while(cin>>a) { if(!strcmp(a,""))//空一...
分类:其他好文   时间:2014-11-19 18:38:30    阅读次数:106
fastJson 转换日期格式
第一种方法: JSON.DEFFAULT_DATE_FORMAT = "yyyy-MM-dd"; String str = JSON.toJSONString(user,SerializerFeature.WriteDateUseDateFormat);第二种方法:JSON.toJSONStri.....
分类:Web程序   时间:2014-11-19 18:08:59    阅读次数:995
OC 基本语法——NSString
NSString 常用方法// 字符串的初始化 NSString *str = [NSString stringWithFormat:@"^^^^ %@####",dyh ];// 字符串的拼接 NSString *a1 = [dyh stringByAppendingString:...
分类:其他好文   时间:2014-11-19 18:05:12    阅读次数:220
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!