ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
String utility. More...
Static Public Member Functions | |
static | textMatch ($haystack, $needle, $collation, $matchType='contains') |
Checks if a needle occurs in a haystack ;) More... | |
static | ensureUTF8 ($input) |
This method takes an input string, checks if it's not valid UTF-8 and attempts to convert it to UTF-8 if it's not. More... | |
String utility.
This class is mainly used to implement the 'text-match' filter, used by both the CalDAV calendar-query REPORT, and CardDAV addressbook-query REPORT. Because they both need it, it was decided to put it in Sabre instead.
Definition at line 16 of file StringUtil.php.
|
static |
This method takes an input string, checks if it's not valid UTF-8 and attempts to convert it to UTF-8 if it's not.
Note that currently this can only convert ISO-8559-1 to UTF-8 (latin-1), anything else will likely fail.
string | $input |
Definition at line 79 of file StringUtil.php.
References $input.
Referenced by Sabre\CardDAV\AddressBook\createFile(), Sabre\CardDAV\Card\put(), Sabre\DAV\StringUtilTest\testEnsureUTF8_ascii(), Sabre\DAV\StringUtilTest\testEnsureUTF8_latin1(), and Sabre\DAV\StringUtilTest\testEnsureUTF8_utf8().
|
static |
Checks if a needle occurs in a haystack ;)
string | $haystack | |
string | $needle | |
string | $collation | |
string | $matchType |
Definition at line 27 of file StringUtil.php.
Referenced by Sabre\DAV\StringUtilTest\testBadCollation(), Sabre\DAV\StringUtilTest\testBadMatchType(), Sabre\DAV\StringUtilTest\testTextMatch(), Sabre\CardDAV\Plugin\validateParamFilters(), Sabre\CalDAV\CalendarQueryValidator\validateTextMatch(), and Sabre\CardDAV\Plugin\validateTextMatches().