[Reviewer: Alex] Utils update

Alex, can you review these changes to add(/move into cpp-common) a couple of utility functions.
I've also moved some of the fake* files used in UTs into cpp-common
I think some examples in the method comment would be useful. Also some comments in the function itself e.g. `// Character is not within the first quote pair` would be good as well.