Difference between revisions of "CENTER()"

From Lianjapedia
Jump to: navigation, search
m (Text replace - "Recital" to "Lianja")
Line 15: Line 15:
 
==Example==
 
==Example==
 
<code lang="recital">
 
<code lang="recital">
? center("Recital", 20)
+
? center("Lianja", 20)
       Recital        
+
       Lianja        
? "'" + center("Recital", 20) + "'"
+
? "'" + center("Lianja", 20) + "'"
'      Recital        
+
'      Lianja        
heading = center("Recital", 20)
+
heading = center("Lianja", 20)
 
? type("heading")
 
? type("heading")
 
C
 
C

Revision as of 12:31, 7 December 2012

Purpose

Function to center a character expression

Syntax

CENTER(<expC>,<expN>)

CENTRE(<expC>,<expN>)

See Also

LPAD(), RPAD()

Description

The CENTER() function centers the character expression <expC> into a character string which is <expN> characters wide.

Example

? center("Lianja", 20)
      Lianja       
? "'" + center("Lianja", 20) + "'"
'      Lianja       
heading = center("Lianja", 20)
? type("heading")
C