Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. StringHelper.php

function StringHelper::startsWith

6 calls to StringHelper::startsWith()
FilepathNamespaceExtractor::getTypeNameFromProjectPath in vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/Files/FilepathNamespaceExtractor.php
NamespaceHelper::isFullyQualifiedName in vendor/slevomat/coding-standard/SlevomatCodingStandard/Helpers/NamespaceHelper.php
NamespaceHelper::isTypeInNamespace in vendor/slevomat/coding-standard/SlevomatCodingStandard/Helpers/NamespaceHelper.php
TypeHintHelper::normalize in vendor/slevomat/coding-standard/SlevomatCodingStandard/Helpers/TypeHintHelper.php
TypeNameMatchesFileNameSniff::process in vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/Files/TypeNameMatchesFileNameSniff.php
* @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint *

... See full list

File

vendor/slevomat/coding-standard/SlevomatCodingStandard/Helpers/StringHelper.php, line 15

Class

StringHelper
@internal

Namespace

SlevomatCodingStandard\Helpers

Code

public static function startsWith(string $haystack, string $needle) : bool {
    return $needle === '' || strpos($haystack, $needle) === 0;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal