AnsiString str = "Hello, world!"; int pos = str.Pos("world"); // pos will be 8
AnsiString str = "The quick brown fox jumps over the lazy dog"; int pos = str.Pos("cat"); // pos will be 0
AnsiString str = "This is a test"; int pos = str.Pos("is"); // pos will be 3The AnsiString Pos function is a part of the Borland C++ Builder package library.