本文整理自网络,侵删。
写个函数也可以 function IsMobileNumber( num:string ):boolean; begin Result:=False; if length( trim( Num ) ) <> 11 then Exit; if ( ( copy( num, 1, 2) <> '13' ) and ( copy( num , 1, 2) <> '15' ) ) then Exit; try StrToInt( copy( num, 3, 9 ) ); Result:=True; except end; end;
相关阅读 >>
更多相关阅读请进入《Delphi》频道 >>