使用Pos函数来定位子字符串第一次出现的位置
函数定义:
Function Pos(Substr: String, S: String): Integer;
表示取出Substr在S中第一次出现的位置,返回取到的位置
比如:Pos('a', '1234a'); //返回值为5
使用Copy函数来截取字符串
函数定义:
Function Copy(S: <string or dynamic array>, Index: Integer, Count: Integer): String;
表示从S字符串中的第Index个位置开始向后取Count个字符,返回取到的字符串
比如:Copy('123456789', 2, 2); //返回值为 '23'