Documentation

modifier.substring.php

Tags
copyright

CiviCRM LLC https://civicrm.org/licensing

Table of Contents

Functions

smarty_modifier_substring()  : string
Smarty plugin Type: modifier Name: substring Version: 0.1 Date: 2006-16-02 Author: Thorsten Albrecht <thor_REMOVE.THIS_@wolke7.net> Purpose: "substring" allows you to retrieve a small part (substring) of a string.

Functions

smarty_modifier_substring()

Smarty plugin Type: modifier Name: substring Version: 0.1 Date: 2006-16-02 Author: Thorsten Albrecht <thor_REMOVE.THIS_@wolke7.net> Purpose: "substring" allows you to retrieve a small part (substring) of a string.

smarty_modifier_substring(string $string, int $position, int $length) : string

Notes: The substring is specified by giving the start position and the length. Unlike the original function substr() in PHP the position of the characters in the string starts at 1 (not at 0 as usual in php). Example smarty code: {$my_string|substring:2:4} returns substring from character 2 until character 6

Parameters
$string : string
$position : int

startposition of the substring, beginning with 0

$length : int

length of substring

Tags
link

on substr(): http://www.zend.com/manual/function.substr.php

Return values
string

        
On this page

Search results