一个字符传处理问题!!(20分)

  • 主题发起人 主题发起人 雨林18
  • 开始时间 开始时间

雨林18

Unregistered / Unconfirmed
GUEST, unregistred user!
我找出左边第一个字符不为 D,K,W,T 的是用哪个函数
还有左边第一,二个字符为A3 和 J 又是用哪个函数
(注意我不想用rightStr(a,1)一个个去判断有没有类似于sql 里面的 notin涵数 )两个基本点问题一个10分
 
var
s:string;
begin
//左边第一个字符不为 D,K,W,T
if not (s[1] in ['D','K','W','T'] then

//左边第一,二个字符为A3 和 J
if (s[1] = 'A') and (s[2] = '3') then
if (s[1] = 'J') and (s[2] = 'J') then
 
楼上方法可行
 
接受答案了.
 

Similar threads

回复
0
查看
1K
不得闲
S
回复
0
查看
1K
SUNSTONE的Delphi笔记
S
后退
顶部