Writing toolsCONSTANT_CASE converter

CONSTANT_CASE converter

Join uppercase words and number groups with underscores for constant names.

Add or drop TXT, Markdown, CSV, TSV, LOG, DOCX, ODT, or PDF files.

Preview

What this tool is for

Prepare an environment-variable name or a constant for a configuration example. Underscores make a long uppercase name readable when it contains several words and a version number.

How to use it

Paste “maxUploadSize2”. The preview reads “MAX_UPLOAD_SIZE_2”. Copy the result as the key, then add the equals sign and value in your configuration file.

Worked example

Input

maxUploadSize

Result

MAX_UPLOAD_SIZE

Should I paste a whole assignment?

Paste only the name. In “port=8080”, the value is treated as another token and the output becomes “PORT_8080”. Keep the value separate if the key should simply be PORT.