reesemclean/blueprint

Support for simple upper case

Opened this issue · 3 comments

For c header files i use include guards like

#ifndef HEADER_H
#define HEADER_H
...
#endif

HEADER_H is typically the corresponding header filename in uppercase.

Sometimes I have some software module with numbers. In that case the upperCase implementation does not work, because i get blanks then:

e.g. for header1.h i would get:
#ifndef HEADER 1_H

which will not work. I'd like to have an option to just get the characters uppercase without separation of words.

Currently as a workaround i use upperSnakeCase, but then i get HEADER_1_H (However I'd prefer HEADER1_H)

You can find a demo in the attached zip File. If I use MyHeader1 as input (name), then i get "MY HEADER 1" for upperCase and "MY_HEADER_1" as upperSnakeCase. Actually i use upperSnakeCase, it works technically for the include guards, but the common conventions for include guards of c/c++ header files is to use just uppercase of the filename ("MYHEADER1"). Of course we need some different conversion name for that like simpleUpperCase or something like that to get the desired output (it shall be just the name in uppercase without further modifications).

demo.zip

To solve this problem it seems like we need to be able to chain transforms together. So upperCase followed by a new transform of "alphanumeric" to strip out all but letters and numbers.

Or like you said add a new transform for this specific case.

Would be open to either solution preferring the chain version... obviously more work though.