foxpro 的atc()函数 和 at()有什么作用各有什么区别?

来源:百度知道 编辑:UC知道 时间:2024/06/16 03:33:05

at():求字符串中子字符串的起始位置,区分大小写。
STORE 'Now is the time for all good men' TO gcString
STORE 'is the' TO gcFindString
CLEAR
? AT(gcFindString,gcString) && Displays 5
STORE 'IS' TO gcFindString
? AT(gcFindString,gcString) && Displays 0, case-sensitive

atc():求字符串中子字符串的起始位置,不区分大小写。
STORE 'Now is the time for all good men ... ' TO gcString
STORE 'IS THE' TO gcFindString
CLEAR
? ATC(gcFindString, gcString) && Displays 5
STORE 'is' TO gcFindString
? ATC(gcFindString, gcString) && Displays 5
? ATC('now',gcString) && Displays 1