Bug report #4425
Add a capitalize() function to the expression based labeling engine
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||fixed|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||14357|
This probably doesn't require a long description. It'd be useful for the expression based labeling engine to have a capitalize() function.
Typical case study: Bob gets a shapefile of protected areas in which the name of each area is saved in uppercase (e.g. 'PHNOM TAMAO', 'BOTUM SAKOR') to add to his project. Bob doesn't want to use uppercase strings there because another set of features on his map uses uppercase strings.
With the capitalize() function, Bob could simply go to the expression based labeling engine and input capitalize(P_AREA_NAME).
#2 Updated by Nathan Woodrow over 9 years ago
Seems that MS SQL doesn't have a function. You have to define your own :S I suggest we follow postgresql and go with inticap(x). postgresql seems to follow the standard better than anyone else, so I think they are a good model to base the functions off.
#5 Updated by Alister Hood over 8 years ago
- Resolution set to fixed
- Status changed from Open to Closed
There is an upper() function, which is what I initially thought this ticket was about, in at least master (not sure about 1.8).
And there is now a title() function in master to convert to title case, which I think is what this ticket is actually about.