Convert CamelCase string to Capitalized_snake_case without regex

Well I expected Capitalized_snake_case or maybe Capitalized_underscore (Capitalized_underscore vs CamelCase) is a better name.