Home mm2k6 Help Files Procedures Input Processing - PadLeft
24 | 01 | 2018
Input Processing - PadLeft
Article Index
Input Processing
Abs
IsEmpty
PadLeft
StripAnsi
Val
All Pages

@PadLeft(text,character,number)

Returns a string padded on the left with a specific character.

   text - Text to pad. 
   character - Character to use for padding. 
   number - number of pad characters to add.

@PadRight(text,character,number)

Returns a string padded on the right with a specific character.

   text - Text to pad. 
   character - Character to use for padding. 
   number - number of pad characters to add.

@PreTrans(stuff to do)

Many commands in Mud Master translate variables and evaluate procedure when
the command is executed. An example of this is when you define a macro that
contains a variable -- when you press the macro key the variable gets
translated. Sometimes, however, you will want the macro to store the value of
that variable instead of the variable name itself. PreTrans allows you to
expand variables and evaluate procedures at the time the command is created.

/macro {f1} {say $Var}
When the F1 key is press the variable gets translated.

/macro {f2} {say @PreTrans($Var)}
In this case, using PreTrans, the variable gets expanded when the macro is
created. If $Var="Bob" the macro created is essentialy: /macro {f2} {say Bob}

@Replace(string,string,string)

Replaces all the instances of stringToReplace in string with ReplacementString and returns the result.
Variables may be used for any of the strings.

@Replace(XoXoX,o,AA) returns XAAXAAX

@RTrim(text)

RTrim removes any spaces from the right side of a string.

@Right(text,number of characters)

Right returns a number of characters from the right side of a string.

@Right(Arithon,3)
Would return the string "hon". The 3 rightmost characters.