fprintf() 、sprintf、snprintf:int fprintf(FILE *stream, const char *format, ...);int sprintf(char *str, const char *format, ...);int snprintf(char *str,...
【题目简述】:字符串的简单处理,看懂题意,特别是他给的那个例子就好,很简单
见代码:
#include
#include
#include
#include
using namespace std;
char str[211][211];
int main()
{
int colum;
char str1[211];
int tmp;
while(cin>>colum,co...
分类:
其他好文 时间:
2014-09-02 21:25:55
阅读次数:
248
二级指针找出最大的字符:#include char maxchar(char * str, char** max){ char da = *str; //先让最大的执行第一个字符 *max = str; while (*str) { if (*str > da) { ...
分类:
其他好文 时间:
2014-09-02 21:17:25
阅读次数:
226
如题~ 此算法仅供参考,小菜基本不懂高深的算法,只能用最朴实的思想去表达。 1 //找出字符串中第一个不重复的字符 2 // firstUniqueChar("vdctdvc"); --> t 3 function firstUniqueChar(str){ 4 var str = str...
分类:
编程语言 时间:
2014-09-02 19:46:25
阅读次数:
189
function producedate(){ var date=new Date(); var str=date.getFullYear()+"-"; if((date.getMonth()+1)<10){str+="0"+(date.getMonth()+1);}else{str+=(date....
分类:
其他好文 时间:
2014-09-02 19:43:15
阅读次数:
201
js字符串常用方法枚举/*
functionobj$(id)根据id得到对象
functionval$(id)根据id得到对象的值
functiontrim(str)删除左边和右边空格
functionltrim(str)删除左边空格
functionrtrim(str)删除右边空格
functionisEmpty(str)字串是否有值
functionequals(str1,str2)js判断比较两..
分类:
Web程序 时间:
2014-09-02 18:11:36
阅读次数:
269
二级指针找出最大的字符:char maxchar(char * str, char** max){ char da = *str; //先让最大的执行第一个字符 *max = str; while (*str) { if (*str > da) { da = *str; *max = str; } ...
分类:
其他好文 时间:
2014-09-02 17:29:15
阅读次数:
165
对于HTMLParser 2.0工具包我们需要修改其中的Page.java文件使其适用中文的html文件分析。 主要是把protected static final String DEFAULT_CHARSET = "ISO-8859-1";修改成protected static final Str...
分类:
Web程序 时间:
2014-09-02 17:15:25
阅读次数:
249
function strLength(str){ var time1 = new Date; if(str.length == 0 || !str) return null; var l = str.length; for(var i = 0; i 255) l++; ...
分类:
其他好文 时间:
2014-09-02 17:06:24
阅读次数:
239
1.相关的随机函数:mt_rand(),shuffle(),str_shuffle()2.总之就是字符串 数组 的灵活使用#打乱字符串str_shuffle, 截取字符串substr$str="abcdefghjklmnuvwxyz0123456789"; $str = str_shu...
分类:
其他好文 时间:
2014-09-02 13:50:14
阅读次数:
185