Skip to content
← Back to Community
5.B. Strings: Replace in fragment
Profile icon
pole55

Given a string in which the letter h occurs at least twice, replace every occurrence of the letter h by the letter H, except for the first and the last ones.

Example input
In the hole in the ground there lived a hobbit

Example output
In the Hole in tHe ground tHere lived a hobbit

Voters
Profile icon
AddisonLeonard
Profile icon
tomsfy
Profile icon
pole55