TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Core\Utility\StringUtility Class Reference

Static Public Member Functions

static isLastPartOfString ($haystack, $needle)
 

Detailed Description

This file is part of the TYPO3 CMS project.

It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the License, or any later version.

For the full copyright and license information, please read the LICENSE.txt file that was distributed with this source code.

The TYPO3 project - inspiring people to share! Class with helper functions for string handling

Author
Susanne Moog typo3.nosp@m.@sus.nosp@m.anne-.nosp@m.moog.nosp@m..de

Definition at line 21 of file StringUtility.php.

Member Function Documentation

◆ isLastPartOfString()

static TYPO3\CMS\Core\Utility\StringUtility::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
Returns
boolean TRUE if $needle was found to be equal to the last part of $str

Definition at line 32 of file StringUtility.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\_parseFunc(), TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject\applyStandardWrapToFluidPaths(), TYPO3\CMS\Core\Tests\Unit\Utility\StringUtilityTest\isLastPartOfStringReturnsFalseForNotMatchingFirstPart(), TYPO3\CMS\Core\Tests\Unit\Utility\StringUtilityTest\isLastPartOfStringReturnsThrowsExceptionWithInvalidArguments(), and TYPO3\CMS\Core\Tests\Unit\Utility\StringUtilityTest\isLastPartOfStringReturnsTrueForMatchingFirstPart().