TYPO3  7.6
Static Public Member Functions | List of all members
StringUtility Class Reference

Static Public Member Functions

static isLastPartOfString ($haystack, $needle)
 
static beginsWith ($haystack, $needle)
 
static endsWith ($haystack, $needle)
 
static getUniqueId ($prefix= '')
 

Detailed Description

Class with helper functions for string handling

Definition at line 20 of file StringUtility.php.

Member Function Documentation

static beginsWith (   $haystack,
  $needle 
)
static

Returns TRUE if $haystack begins with $needle. The input string is not trimmed before and search is done case sensitive.

Parameters
string$haystackFull string to check
string$needleReference string which must be found as the "first part" of the full string
Exceptions
\InvalidArgumentException
Returns
bool TRUE if $needle was found to be equal to the first part of $haystack

Definition at line 63 of file StringUtility.php.

Referenced by ContentObjectRenderer\_parseFunc(), TcaColumnsProcessPlaceholders\addData(), TcaInputPlaceholders\addData(), ExtensionManagementUtility\addFieldsToAllPalettesOfField(), ExtensionManagementUtility\addModulePath(), FileLinkHandler\canHandleLink(), TableController\changeFunc(), RsaEncryptionDecoder\decryptDataArray(), LinkHandler\fetchType(), TemplateService\flattenSetup(), SvgIconProvider\generateInlineMarkup(), BitmapIconProvider\generateMarkup(), SvgIconProvider\generateMarkup(), PathUtility\getAbsoluteWebPath(), FormEngineUtility\getIconHtml(), PostgresSpecifics\getNativeDefaultValue(), BackendUtility\getPagesTSconfig(), FrontendLoginController\isInCurrentDomain(), CliRequestHandler\loadCommandLineBackendUser(), NewContentElementController\main(), TcaMigration\migrateExtAndSysextPathToEXTPath(), TcaMigration\migrateIconfileRelativePathOrFilenameOnlyToExtReference(), TypoScriptParser\parseSub(), IconRegistry\registerTCAIcons(), ContentObjectRenderer\resolveMixedLinkParameter(), TypoScriptFrontendController\set_no_cache(), and RteHtmlParser\TS_links_rte().

static endsWith (   $haystack,
  $needle 
)
static

Returns TRUE if $haystack ends with $needle. The input string is not trimmed before and search is done case sensitive.

Parameters
string$haystackFull string to check
string$needleReference string which must be found as the "last part" of the full string
Exceptions
\InvalidArgumentException
Returns
bool TRUE if $needle was found to be equal to the last part of $haystack

Definition at line 92 of file StringUtility.php.

Referenced by ContentObjectRenderer\_parseFunc(), FluidTemplateContentObject\applyStandardWrapToFluidPaths(), SystemInformationToolbarItem\getGitRevision(), FormEngineUtility\getIconHtml(), and IconRegistry\registerTCAIcons().

static getUniqueId (   $prefix = '')
static
static isLastPartOfString (   $haystack,
  $needle 
)
static

Returns TRUE if $haystack ends with $needle. The input string is not trimmed before and search is done case sensitive.

Parameters
string$haystackFull string to check
string$needleReference string which must be found as the "last part" of the full string
Exceptions
\InvalidArgumentException
Returns
bool TRUE if $needle was found to be equal to the last part of $str
Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8, use endsWith() instead

Definition at line 33 of file StringUtility.php.

References GeneralUtility\logDeprecatedFunction().