在Delphi中如何查找一个字符串的特殊子字符串?

解决方案 »

  1.   

    如果string里在多个sub_string,如何区分这些的位置?
      

  2.   

    StrPos
    -------------------------------------------Returns a pointer to the first occurrence of STR2 in STR1.UnitSysUtilsCategorystring handling routines (null-terminated)function StrPos(const Str1, Str2: PChar): PChar;DescriptionStrPos returns a pointer to the first occurrence of Str2 in Str1. If Str2 does not occur in Str1, StrPos returns nil.Note: If the source string contains international characters, use AnsiStrPos instead.
      

  3.   

    用pos()函数!
    有问题请发信息到我的E-mail:[email protected]