字符串从后面截取(以.为标志)

char DNS_Return[] = "cp-kzk.zpz34.4ymga.sdfds.info.";
char temp[100]= {0};
int z=0,y=0;
memcpy(temp,DNS_Return,strlen(DNS_Return));
for ( z=strlen(temp)-1; z>0; z--)
{
if (y==3)
{
break;
}
if (temp[z]=='.')
{
y++;
temp[z+1]=0;
}
}
char* IP_TW = sub_28E0(temp);//203.73.174.55 cp-kzk.zpz34.4ymga

posted on 2015-03-02 16:10  寻步  阅读(2310)  评论(0编辑  收藏  举报