User Tools

Site Tools


syntax:functions:proper

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
syntax:functions:proper [2018/01/17 08:38] dmitrysyntax:functions:proper [2021/08/14 22:22] (current) – [Examples] craigt
Line 1: Line 1:
-====Proper(text_value)====+====== Proper(text) ====== 
 +Category:  Text function
  
-Converts //text_value// to the proper case, i.e. first letter becomes uppercase, others become lowercase. +\\  
 +=====Description===== 
 +This function converts //text// to the proper case (or "title case"), i.e. the first letter of each word becomes uppercase, the remaining letters become lowercase. 
  
-Note that abbreviations always remain uppercase. To convert a text with abbreviations to the proper case, make it lowercase first.+\\  
 +=====Arguments===== 
 +^Argument^Type^Description^ 
 +|text|Text|The text value to convert to proper case.|
  
-^  Example  ^  Result +**Return value type:** Text
-| proper('hey Jude' | Hey Jude  | +
-| proper('back to the USSR' | Back To The USSR  | +
-| proper(lower('UPPER CASE TEXT'))  | Upper Case Text |+
  
-=== See also ===+\\  
 +=====Remarks===== 
 +This function has no effect on numbers, symbols, or non-printing characters.
  
-  * [[syntax:functions:upper]] +Note that words that appear in all uppercase letters retain their case.  To convert these strings to proper case, first convert them to lowercase.  See examples below. 
-  * [[syntax:functions:lower]]+ 
 +\\  
 +=====Examples===== 
 + 
 +  proper('hey Jude') //Returns 'Hey Jude' 
 + 
 +  proper('back to the USSR') //Returns 'Back To The USSR"  (All uppercase words remain uppercase) 
 + 
 +  proper(lower('UPPER CASE TEXT')) //Returns 'Upper Case Text'  (Convert uppercase words to lowercase first) 
 + 
 +\\  
 +===== See also ===== 
 +  * [[syntax:functions:lower|Lower(text)]] 
 +  * [[syntax:functions:upper|Upper(text)]]
syntax/functions/proper.1516196311.txt.gz · Last modified: 2018/01/17 08:38 by dmitry

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki