您的位置:首页 > 其它

如何判断当前字符串是不是Table

2012-04-17 10:07 127 查看
static void TestTableName(Args _args)
{
str tmpStr = "TableName";
;
if (TableName2Id(tmpStr))
{
info("It is a table");
}
else
{
info("Sorry,it is not a table");
}
}

// another method

static server boolean checkTableName(str 50 _str)
{
Dictionary dictionary ;
int tableCnt ;
int i ;
TableId tableId ;
;
dictionary = new Dictionary() ;
tableCnt = dictionary.tableCnt();
for (i = 1 ; i <= tableCnt ; i++)
{
tableId = dictionary.tableCnt2Id(i) ;
if ( _str == dictionary.tableName(tableId) )
{
return true ;
}
}
return false ;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: