The two poles are 10 m apart, and the height difference between them is $18 - 6 = 12$ m. To minimize the length of the string, it will follow a straight line from the top of one pole, to the peg on the ground, and then to the top of the other pole.
We can consider this as a right triangle, where:
- The base is 10 m (the distance between the poles),
- The height is 12 m (the difference in height between the poles).
The minimum length of the string will be the hypotenuse of this right triangle, calculated using the Pythagorean theorem:
\[
\text{Length of string} = \sqrt{10^2 + 12^2} = \sqrt{100 + 144} = \sqrt{244} \approx 15.6 \, \text{m}.
\]
Thus, the minimum length of the string is approximately 25 m.
Thus, the correct answer is (A).