@mikeyww
Thanks a lot. Yet I had something different in mind.
So let me give you another example what I'm looking for.
Content of str:
Code: Select all
This line is above the headline and has a period.
This is my headline
This line is below the headline and has a period.
After conversion I would like to get this result,
the str variable should contain this now:
Code: Select all
This line is above the headline and has a period.
This is my headline.
This line is below the headline and has a period.
The empty lines are gone and the headline ended
with a period.
How can I do this? Thanks for your help!