Introduce case_character function
Move single-character casing logic into a separate function so that it is collected in a single place. This will make future changes to the logic easier. This commit introduces no functionality changes. * src/casefiddle.c (struct casing_context, prepare_casing_context): New sturcture for saving casing context and function to initialise it. (case_character): New function which cases character base on provided context. (do_casify_integer, do_casify_multibyte_string, do_casify_unibyte_string, casify_object, casify_region): Convert to use casing_context and case_character.
Showing
Please register or sign in to comment