leaf
leaf copied to clipboard
camelCaseToUpperSpaced works poorly with acronyms
A dataset column such as MRICount gets presented as M R I Count
by default, due to the use of camelCaseToUpperSpaced
.
Possible solutions:
- Leave it as is and accept poor display of "MRI".
- Ask users to represent this as
MriCount
and accept poor display of "MRI". - Special case multiple uppercase letters in a row, i.e. replace
caps = /([A-Z])/g
withcaps = /(?<![A-Z])([A-Z])/g
.- Some cases will remain bad, e.g.
camelCaseToUpperSpaced("NumberOfMRIs") == "Number Of MR Is"
- Some cases will remain bad, e.g.
- Allow the administrator to set
displayName
inDynamicDatasetQuery.Schema
- Avoid using
camelCaseToUpperSpaced
since heuristics can always go wrong.