Home
About
Policies
FAQ
Forums
Registration
Password Recovery

Center (MPI)

From Tapestries MUCK

(Difference between revisions)
Jump to: navigation, search
m (Fixed up the formatting)
 
(3 intermediate revisions not shown)
Line 1: Line 1:
-
[[Category:MPI functions]]
+
[[Category:functions (MPI)]][[Category:String Functions (MPI)]]
=center=
=center=
<mpi>{center:string}
<mpi>{center:string}
{center:string,fieldwidth}
{center:string,fieldwidth}
{center:string,fieldwidth,padstring}</mpi>
{center:string,fieldwidth,padstring}</mpi>
-
Takes a string and pads it to fit the given fieldwidth, with the string center justified. If no padstring is given, it assumes that it will pad the string with spaces.  
+
Takes a string and pads it to fit the given fieldwidth, with the string center justified.
-
If no fieldwidth is given, it assumes that the field width is 78 characters. Example:
+
 
 +
If no padstring is given, it assumes that it will pad the string with spaces.  
 +
If no fieldwidth is given, it assumes that the field width is 78 characters.
 +
 
 +
Example:
<mpi>{center:Hello,10,1234567890}</mpi>
<mpi>{center:Hello,10,1234567890}</mpi>
would return the string "123Hello12"
would return the string "123Hello12"

Latest revision as of 04:24, 31 March 2007

center

{center:string}
{center:string,fieldwidth}
{center:string,fieldwidth,padstring}

Takes a string and pads it to fit the given fieldwidth, with the string center justified.

If no padstring is given, it assumes that it will pad the string with spaces. If no fieldwidth is given, it assumes that the field width is 78 characters.

Example:

{center:Hello,10,1234567890}

would return the string "123Hello12"

Personal tools
Namespaces
Variants
Actions
navagation
information
wiki
Toolbox