SilverCart\Dev\StringTools
Provides string related tools.
- Author: Sebastian Diel <sdiel@pixeltricks.de>
- Copyright: 2020 pixeltricks GmbH
- License: see license file in modules root directory
Synopsis
class StringTools
{
- // methods
- public static DBHTMLText string2html()
- public static string string2urlSegment()
- public static void replace_special_chars()
- public static void replace_cyrillic_chars()
- public static string htmlEntityDecode()
- public static string removeSpecialChars()
Methods
public
- htmlEntityDecode() — Calls html_entity_decode on $string and then converts all numeric entities.
- removeSpecialChars() — Removes all characters except A-Z, a-z, 0-9, ÄäÜüÖö, ' ' (space).
- replace_cyrillic_chars() — Replaces cyrillic chars with latin chars
- replace_special_chars() — Replaces special chars.
- string2html() — Takes the given string and puts it into a DBHTMLText object to render properly in a template.
- string2urlSegment() — Remove chars from the given string that are not appropriate for an url