[QGIS-Developer] Label Text Type case option 'Capitatlize first letter' ONLY capitalizes first letter
Richard Duivenvoorde
rdmailings at duif.net
Thu Sep 21 12:53:28 PDT 2017
Hi Devs,
In the Label properties/Text/Type case there is an option 'Capitalize
first letter'.
Having a set with text like
'WORD' and 'text'
I thought I would end up with
'Word' and 'Text'
... but it appears that it really ONLY capitalizes the first letter and
does not touch the rest of the string, so becomes
'WORD' and 'Text'
Looking at
https://github.com/qgis/QGIS/blob/master/src/core/qgsstringutils.cpp#L38
And
https://github.com/qgis/QGIS
/blob/master/src/core/qgsstringutils.h#L177
it gives the answer:
//!< Convert just the first letter of each word to uppercase, leave the
rest untouched
So Question:
- isn't a Type case function which first does all lowercase and THEN
convert the first letter more helpfull?
- can I add it (looks easy)?
- how would I call it: 'Camelcase' ?
- is current 'Capitalize first letter' actually helpfull or is
'CamelCase' actually what it should be?
Regards,
Richard Duivenvoorde
More information about the QGIS-Developer
mailing list