indent

Summary

Indents a string by inserting characters at the start of it.

Usage

$input_string|indent( count [, type] [, filler] )

Parameters

NameTypeDescriptionRequired
count integer Number of indentations. yes
type string Type of indentation. no
filler string Custom indentation. no

Returns

indented version of input string.

Description

This operator indents the input string in some way and returns it. The indentation type can be either 'space', 'tab' or 'custom'. The default indentation is space. If the indentation type is set to 'custom', the filler parameter must be set to the desired indentation string.

Examples

{"This is my text"|indent( 1 )}

returns the string " This is my text"

{"This is my second text"|indent( 3, 'custom', '.' )}

returns the string "...This is my second text"

Comments

Contents

Reference

Database diagram
Template operators
    PDF
    Arrays
    Data extraction
    Formatting
    Images
    Logic
    Mathematics
    Miscellaneous
    Strings
       mimetype_icon
       append
       begins_with
       break
       ord
       compare
       concat
       contains
       count_chars
       count_words
       crc32
       downcase
       ends_with
       explode
       extract
       extract left
       extract_right
       indent
       insert
       md5
       nl2br
       chr
       pad
       prepend
       remove
       repeat
       reverse
       rot13
       shorten
       simplify
       trim
       upcase
       upfirst
       upword
       wash
       wordtoimage
       wrap
    URLs
    Variables
Template functions
Data fetching
Modules
XML tags


Created

05/02/2004
11:57:02 am
by Balazs Halasy

Last updated

28/04/2004
3:01:57 pm
by Bjørn Reiten

Authors

Balazs Halasy
Bjørn Reiten



This page is part of the Exponential documentation. The documentation is available under the GNU Free Documentation License. All contributions will be released under the terms of this license.