If parsing fails this function should report error by throwing exception. This is further handled by parse to allow for exception-free, functional code.
This function assumes "standard" string formatting, e.g. point as decimal separator or ISO date and time formats, without any locale support. Use FormattedStringParser if more control over source format is required.