博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2011年12月4日

摘要: 一、宽字节转窄字节char* wstr2asc(const short *pSrc, char *pDest){ char *pTmp=pDest; char ctmp=0; short stmp=0;if (NULL==pSrc)return NULL;while (*pSrc) { ctmp=*pSrc; stmp=*pSrc;if (ctmp<0) { *pTmp++=stmp; *pTmp|=(stmp>>=8); } else { *pTmp=*pSrc; } pSrc++; pTmp++; } *pTmp='\0';return pDest;}in 阅读全文

posted @ 2011-12-04 18:23 ccmfc 阅读(287) 评论(0) 推荐(0)