Erste lauffähige Umgebung
This commit is contained in:
23
rendering/Helper/Text.php
Normal file
23
rendering/Helper/Text.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by CS medien- & kommunikationssysteme.
|
||||
* @author Christian Steinle
|
||||
* @date 04.12.2016
|
||||
*
|
||||
* @copyright CS medien- & kommunikationssysteme (http://www.steinle-computer.de)
|
||||
*/
|
||||
|
||||
namespace Helper;
|
||||
|
||||
|
||||
class Text
|
||||
{
|
||||
public static function prepareText($text)
|
||||
{
|
||||
$text = str_replace(array("\r\n", "\r", "\n"), '', $text);
|
||||
$text = trim(preg_replace('/<p>/', '', $text, 1));
|
||||
$text = preg_replace('/>p\/</', '', strrev($text), 1);
|
||||
$text = strrev($text);
|
||||
return $text;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user