怎么判断String strtmp的strtmp是否为空

fjliningcd 2004-04-15 07:30:59
怎么判断String strtmp的strtmp是否为空
也就是怎么判断strtmp==""
有什么好方法,并说理由。
...全文
95 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
JetKingLau 2004-04-15
  • 打赏
  • 举报
回复
strtmp == ""

strtmp.Length() == 0

strtmp.IsEmpty() == true
fathappy 2004-04-15
  • 打赏
  • 举报
回复
char *buffer = new char [strtmp.Length()+1];
strcpy(buffer,strtmp);
while(*buffer!='\0')
{
;
}
delete [] buffer;
然后单步看一下。
GeoPhoenix 2004-04-15
  • 打赏
  • 举报
回复
strtmp.Length() == 0



strtmp.IsEmpty()



试一下

13,870

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder相关内容讨论区
社区管理员
  • 基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧