在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
function GetBefore(substr, str:string):string; {©Drkb v.3(2007): www.drkb.ru, ®Vit (Vitaly Nevzorov) - [email protected]} begin if pos(substr,str)>0 then result:=copy(str,1,pos(substr,str)-1) else result:=''; end; function GetAfter(substr, str:string):string; {©Drkb v.3(2007): www.drkb.ru, ®Vit (Vitaly Nevzorov) - [email protected]} begin if pos(substr,str)>0 then result:=copy(str,pos(substr,str)+length(substr),length(str)) else result:=''; end; 演示: 1) GetBefore('-', 'Total-2.00$') // 结果 "Total" 2) GetAfter('-', 'Total-2.00$') // 结果 "2.00$" 3) GetBefore('$',GetAfter('-', 'Total-2.00$ (общая сумма)') // 结果 "2.00"
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论