forked from umakantp/jsmart
-
Notifications
You must be signed in to change notification settings - Fork 2
strip
pfaciana edited this page Sep 25, 2019
·
2 revisions
Replaces all spaces, newlines and tabs with a single space, or with the supplied string.
Note:- If you want to strip blocks of template text, use the built-in {strip} function.
| Parameter Position | Type | Required | Default | Description |
|---|---|---|---|---|
| 1 | string | No | one space | This value is replace when srtiping space, new line and tabs. |
Template:
{$articleTitle = "Grandmother of\neight makes\t hole in one."}
{$articleTitle}
{$articleTitle|strip}
{$articleTitle|strip:' '}output:
Grandmother of
eight makes hole in one.
Grandmother of eight makes hole in one.
Grandmother of eight makes hole in one.
see also strip in PHP Smarty documentation.