String Processing
(Easy Problem No# 3)
A solution for this problem can be found here.
One day you wake up to find that you need to write a simple string processor.
This string processor needs to read in a single line of text followed by
a line of commands that will modify the string. Your program should output
the line of processed text.
The commands are as follows:
The cursor can be at the first character, through to being at the position
one after the last character. The input commands are in a single line
following the input text line, not seperated by spaces. The input text line
does not contain a carriage return. The cursor starts at the first character
in the line for each text input line. The input is terminated by an input text
line that contains only a single character, '#'.
SAMPLE INPUT
Hello, I am a frog.
$-----xxxxipieirisioin
Needle nardle noo.
+++xizuu+++xxips
#
SAMPLE OUTPUT
Hello, I am a person.
NeezLE napel noo.
##########################################################################
Competition Server comp@arcadia.cs.rmit.edu.au (via comp@cs.curtin.edu.au)
Problems with server: contact Craig Dillon (cdillon@cs.curtin.edu.au)
##########################################################################