Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 148 | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 148 Revision 991
Zeile 1... Zeile -...
1
strip {#language.modifier.strip}
-
 
2
=====
1
# strip
Zeile 3... Zeile 2...
3
 
2
 
4
This replaces all spaces, newlines and tabs with a single space, or with
3
This replaces all spaces, newlines and tabs with a single space, or with
Zeile -... Zeile 4...
-
 
4
the supplied string.
-
 
5
 
-
 
6
## Basic usage
-
 
7
```smarty
-
 
8
{$myVar|strip}
5
the supplied string.
9
```
6
 
10
 
7
> **Note**
11
> **Note**
8
>
12
>
9
> If you want to strip blocks of template text, use the built-in
-
 
Zeile 10... Zeile 13...
10
> [`{strip}`](#language.function.strip) function.
13
> If you want to strip blocks of template text, use the built-in
11
 
-
 
12
 
-
 
13
    <?php
-
 
Zeile -... Zeile 14...
-
 
14
> [`{strip}`](../language-builtin-functions/language-function-strip.md) function.
-
 
15
 
-
 
16
## Examples
-
 
17
 
14
    $smarty->assign('articleTitle', "Grandmother of\neight makes\t    hole in one.");
18
```php
Zeile 15... Zeile 19...
15
    $smarty->display('index.tpl');
19
<?php
Zeile 16... Zeile 20...
16
    ?>
20
$smarty->assign('articleTitle', "Grandmother of\neight makes\t    hole in one.");
17
 
21
$smarty->display('index.tpl');
18
       
22
```
19
 
23
 
20
Where template is:
-
 
21
 
24
Where template is:
Zeile 22... Zeile 25...
22
 
25
 
Zeile -... Zeile 26...
-
 
26
```smarty
-
 
27
{$articleTitle}
-
 
28
{$articleTitle|strip}
-
 
29
{$articleTitle|strip:'&nbsp;'}
-
 
30
```
-
 
31
 
Zeile 23... Zeile -...
23
    {$articleTitle}
-
 
24
    {$articleTitle|strip}
-
 
25
    {$articleTitle|strip:'&nbsp;'}
-
 
26
 
-
 
27
       
-
 
28
 
-
 
29
Will output:
-
 
30
 
32
Will output:
31
 
33