Class SnippetMacros.Trim

java.lang.Object
javax0.jamal.extensions.SnippetMacros.Trim
All Implemented Interfaces:
javax0.jamal.api.Identified, javax0.jamal.api.Macro, javax0.jamal.api.ServiceLoaded
Enclosing class:
SnippetMacros

public static class SnippetMacros.Trim
extends Object
implements javax0.jamal.api.Macro
Take the argument of the macro and removes N spaces from the start of each line so that there is at least one line that does not start with a space character.

This can be used, when a snippet is included into the macro file and some program code is tabulated. In that case this snippet will be moves to the left as much as possible.

  • Nested Class Summary

    Nested classes/interfaces inherited from interface javax0.jamal.api.Identified

    javax0.jamal.api.Identified.Undefined

    Nested classes/interfaces inherited from interface javax0.jamal.api.Macro

    javax0.jamal.api.Macro.Stateful
  • Field Summary

    Fields inherited from interface javax0.jamal.api.Identified

    DEFAULT_MACRO, MACRO_NAME_ARG1, MACRO_NAME_ARG2

    Fields inherited from interface javax0.jamal.api.Macro

    FETCH
  • Constructor Summary

    Constructors 
    Constructor Description
    Trim()  
  • Method Summary

    Modifier and Type Method Description
    String evaluate​(javax0.jamal.api.Input in, javax0.jamal.api.Processor processor)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface javax0.jamal.api.Macro

    fetch, getId, getIds, prefetch
  • Constructor Details

    • Trim

      public Trim()
  • Method Details

    • evaluate

      public String evaluate​(javax0.jamal.api.Input in, javax0.jamal.api.Processor processor)
      Specified by:
      evaluate in interface javax0.jamal.api.Macro