String'de mesela cout << test("npnythnon","n") << endl;
Bunu dediğim zaman cümlenin başındaki ve sonundaki "n" hariç diğer nleri kaldıracak kod nedir?
Create a New string from a give string where a specified character have been removed except starting and ending position of the given string.
Sample Input:
"xxHxix", "x"
"abxdddca", "a"
"xabjbhtrb", "b"
Sample Output:
xHix
abxdddca
xajhtrb
Bunu dediğim zaman cümlenin başındaki ve sonundaki "n" hariç diğer nleri kaldıracak kod nedir?
Create a New string from a give string where a specified character have been removed except starting and ending position of the given string.
Sample Input:
"xxHxix", "x"
"abxdddca", "a"
"xabjbhtrb", "b"
Sample Output:
xHix
abxdddca
xajhtrb