我正在尝试在字符串中搜索子字符串,但认为必须有比这更有效的方法..
//search for volume
if AnsiContainsStr(SearchString, 'v1') then
Volume := '1';
if AnsiContainsStr(SearchString, 'V1') then
Volume := '1';
if AnsiContainsStr(SearchString, 'Volume1') then
Volume := '1';
if AnsiContainsStr(SearchString, 'Volume 1') then
Volume := '1';
if AnsiContainsStr(SearchString, 'Vol1') then
Volume := '1';
if AnsiContainsStr(SearchString, 'vol1') then
Volume := '1';
if AnsiContainsStr(SearchString, 'Vol 1') then
Volume := '1';
if AnsiContainsStr(SearchString, 'vol 1') then
Volume := '1';
if AnsiContainsStr(SearchString, 'Vol.1') then
Volume := '1';
if AnsiContainsStr(SearchString, 'vol.1') then
Volume := '1';
if AnsiContainsStr(SearchString, 'Vol. 1') then
Volume := '1';
if AnsiContainsStr(SearchString, 'vol. 1') then
Volume := '1';
if AnsiContainsStr(SearchString, 'v2') then
Volume := '2';
if AnsiContainsStr(SearchString, 'V2') then
Volume := '2';
if AnsiContainsStr(SearchString, 'Volume2') then
Volume := '2';
if AnsiContainsStr(SearchString, 'Volume 2') then
Volume := '2';
if AnsiContainsStr(SearchString, 'Vol2') then
Volume := '2';
if AnsiContainsStr(SearchString, 'vol2') then
Volume := '2';
if AnsiContainsStr(SearchString, 'Vol 2') then
Volume := '2';
if AnsiContainsStr(SearchString, 'vol 2') then
Volume := '2';
if AnsiContainsStr(SearchString, 'Vol.2') then
Volume := '2';
if AnsiContainsStr(SearchString, 'vol.2') then
Volume := '2';
if AnsiContainsStr(SearchString, 'Vol. 2') then
Volume := '2';
if AnsiContainsStr(SearchString, 'vol. 2') then
Volume := '2';