Add a capitalize() function to the expression based labeling engine
|Assigned to:||Nathan Woodrow||% Done:||
|Target version:||Version 1.8.0|
|Platform version:||Affected version:||master|
|Status info:||Causes crash or corruption:||No|
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).
Updated by Martin Dobias about 2 years ago
A little bit of research on function name in other SQL databases:
postgresql, oracle: initcap( x )
mysql, ms sql: not available (?)
Updated by Nathan Woodrow about 2 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.
Updated by Paolo Cavallini over 1 year ago
- Target version changed from Version 1.7.4 to Version 1.8.0
- Affected version set to master
- Causes crash or corruption set to No
Updated by Alister Hood over 1 year ago
- Status changed from New to Closed
- Resolution set to fixed
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.