摘要:
1 struct tm { 2 int tm_sec; /* seconds */ 3 int tm_min; /* minutes */ 4 int tm_hour; /* hours */ 5 int tm_mday; /* day of the month */ 6 int tm_mon; /* month */ 7 ... 阅读全文
posted @ 2012-02-25 18:49
woainilsr
阅读(7646)
评论(0)
推荐(0)
摘要:
①使用gmtime函数或localtime函数将time_t类型的时间日期转换为struct tm类型:使用time函数返回的是一个long值,该值对用户的意义不大,一般不能根据其值确定具体的年、月、日等数据。gmtime函数可以方便的对time_t类型数据进行转换,将其转换为tm结构的数据方便数据阅读。gmtime函数的原型如下:struct tm *gmtime(time_t *timep);localtime函数的原型如下:struct tm *localtime(time_t *timep);将参数timep所指的time_t类型信息转换成实际所使用的时间日期表示方法,将结果返回到结构 阅读全文
posted @ 2012-02-25 18:43
woainilsr
阅读(754)
评论(0)
推荐(0)
摘要:
1 NSString *src = @"<a href="http://weibo.com" rel="nofollow">新浪微博</a>" 2 NSRange r=[src rangeOfString:@"<a href"]; 3 if (r.location!=NSNotFound) { 4 5 NSRange start=[src rangeOfString:@"<a href=\""]; 6 if (start.location!=NSNo 阅读全文
posted @ 2012-02-25 18:13
woainilsr
阅读(405)
评论(0)
推荐(0)