ServiceStack/ServiceStack.Text — pull request #387 by twistypigeon (2013-10-30 14:34:27+00:00)
Title: New backward compatible ToLowerUnderscore function

#### Description

Implemented new ToLowercaseUnderscore function in StringExtensions due to recent changes causing backward compatibility issues.

Digits are grouped as if they were words while still being delimited by an underscore from preceding words. This matches implementation from previous versions.
Added tests specifically for the ToLowercaseUnderscore method as these were missing, and can check for breaking changes in future revisions.
Added tests for Json parsing to ensure that the new method works as expected.

#### Notes
This is my first pull request so please be gentle. If there are any problems with the code or the procedure I have followed please let me know and I will be happy to amend.
I noticed that a previous commit had broken backward compatibility with previous Json key format concerning underscores and digits while fixing a different problem. Hence I decided to implement a fix that reimplemented the format as well as (hopefully) fixing the original issue. All tests pass so I am hoping that this is correct.
I am aware that this library is performance based, and while I don't believe my code should have any major performance bottlenecks compared with the previous implementation, if there are any performance hints or tips that your team would like implemented I would be happy to do so.