Added StringParser class and methods

This implementation follows DIP principle.