pmp.macro.str
Class Trim

java.lang.Object
  extended by pmp.AbstractMacro
      extended by pmp.macro.str.Trim

public class Trim
extends AbstractMacro

Strips whitespace from the beginning and/or end of a string.

Title: PMP: Macroprocessor

Description: Java macroprocessor

Copyright: Copyright (c) 2005

Version:
1.0
Author:
Luděk Hlaváček

Field Summary
static java.lang.String BOTH
           
static java.lang.String LEADING
           
static int PARAMS_REQUIRED
           
static java.lang.String TRAILING
           
 
Constructor Summary
Trim()
           
 
Method Summary
 java.lang.String run(Macroprocessor mp, java.lang.String[] params)
          Main method of macro.
 
Methods inherited from class pmp.AbstractMacro
getRequiredParams, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PARAMS_REQUIRED

public static final int PARAMS_REQUIRED
See Also:
Constant Field Values

BOTH

public static final java.lang.String BOTH
See Also:
Constant Field Values

LEADING

public static final java.lang.String LEADING
See Also:
Constant Field Values

TRAILING

public static final java.lang.String TRAILING
See Also:
Constant Field Values
Constructor Detail

Trim

public Trim()
Method Detail

run

public java.lang.String run(Macroprocessor mp,
                            java.lang.String[] params)
Description copied from class: AbstractMacro
Main method of macro. This method is called when this macro is invoked. All subclasses must imlement this method

Specified by:
run in class AbstractMacro
Parameters:
mp - reference to Macroprocessor
params - parameters of macro. In args[0] is stored name of macro. Subclasses are free to modify this array.
Returns:
result of the macro as String