FOSSology  4.4.0
Open Source License Compliance by Open Source Software
Fossology\Lib\Util\StringOperation Class Reference
Collaboration diagram for Fossology\Lib\Util\StringOperation:
Collaboration graph

Static Public Member Functions

static getCommonHead ($a, $b)
 
static replaceUnicodeControlChar ($input, $replace="")
 
static stringStartsWith ($haystack, $needle)
 

Detailed Description

Definition at line 11 of file StringOperation.php.

Member Function Documentation

◆ getCommonHead()

static Fossology\Lib\Util\StringOperation::getCommonHead (   $a,
  $b 
)
static
Parameters
string
string
Returns
string

Definition at line 18 of file StringOperation.php.

◆ replaceUnicodeControlChar()

static Fossology\Lib\Util\StringOperation::replaceUnicodeControlChar (   $input,
  $replace = "" 
)
static

Replace any non-printable characters with a given character

Parameters
string$inputString to clean
string$replaceReplace control char with this
Returns
string Input string with non-printable character removed

Definition at line 35 of file StringOperation.php.

◆ stringStartsWith()

static Fossology\Lib\Util\StringOperation::stringStartsWith (   $haystack,
  $needle 
)
static

Polyfill for PHP8's str_starts_with https://www.php.net/manual/en/function.str-starts-with.php

Parameters
string$haystackString to search in
string$needleString to search for
Returns
bool True if haystack starts with needle.

Definition at line 50 of file StringOperation.php.


The documentation for this class was generated from the following file: