![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C语言
yangsilence
这个作者很懒,什么都没留下…
展开
-
字符串中的字母进行大小写转换
int i=0; char strUid[30]; memset(strUid,0,sizeof(strUid)); strcpy(strUid,"e007A0001f5fef5b"); while(strUid[i++]!='\0') { if(strUid[i-1]>='a'&&strUid[i-1] { /*判断是否为小写,并转换成大写*/ strUid[i原创 2012-10-31 16:37:04 · 806 阅读 · 0 评论 -
判断字符串是否全部是数字
int iNumberFlag = 1 ; int i=0; char cGetMessage[50]; memset(cGetMessage,0,sizeof(cGetMessage)); strcpy(cGetMessage,"1234aa5"); for(i=0 ; i { if(cGetMessage[i] '9') { iNumberFlag原创 2012-10-31 16:41:11 · 208 阅读 · 0 评论 -
获得linux的系统时间
time_t tNow; char buf[30] = {0}; struct tm *pTime; time(&tNow); pTime=localtime(&tNow); //取得当地时间 //下面2种方法都可以 strftime(buf,sizeof(buf),"%Y-%m-%d %H:%M:%S",pTime);原创 2012-10-31 16:43:14 · 330 阅读 · 0 评论