To delete part of a string, you need to use the delete(s, firstIndex, count) method: it removes count characters from the string s, starting from firstIndex
s := '0123456789';
delete(s, 4, 6); // s1="0129"
To copy part of a string, you can use the copy(s, index, count) method - it will return a part of the string s, starting at index index and length count
s := '123456789';
s1 := copy(s, 3, 4); // s1 = '3456'