AnsiString str = "Hello World!"; AnsiString sub_str = str.Mid(2); // sub_str will be "llo World!"
AnsiString str = "Hello World!"; AnsiString sub_str = str.Mid(2, 5); // sub_str will be "llo W"These examples use the Mid method from the AnsiString class which is a part of the VCL library.