Open Journal Systems  3.3.0
Seboettg\CiteProc\Util\StringHelper Class Reference

Static Public Member Functions

static camelCase2Hyphen ($string)
 
static capitalizeAll ($text)
 
static capitalizeForTitle ($titleString)
 
static checkLowerCaseString ($string)
 
static checkUpperCaseString ($string)
 
static clearApostrophes ($string)
 
static implodeAndPreventConsecutiveChars ($delimiter, $arrayOfStrings)
 
static initializeBySpaceOrHyphen ($string, $initializeSign)
 
static isAsianString ($string)
 
static isCyrillicString ($string)
 
static isLatinString ($string)
 
static keepLowerCase ($word)
 
static mb_strrev ($string)
 
static mb_ucfirst ($string, $encoding='UTF-8')
 
static removeBrackets ($datePart)
 
static replaceOuterQuotes ( $text, $outerOpenQuote, $outerCloseQuote, $innerOpenQuote, $innerCloseQuote)
 

Data Fields

const ADJECTIVES
 
const ADVERBS
 
const ARTICLES
 
const CLOSING_QUOTE = "”"
 
const CONJUNCTIONS
 
const ISO_ENCODINGS
 
const OPENING_QUOTE = "“"
 
const PREPOSITIONS
 

Detailed Description

Definition at line 22 of file StringHelper.php.

Member Function Documentation

◆ camelCase2Hyphen()

static Seboettg\CiteProc\Util\StringHelper::camelCase2Hyphen (   $string)
static
Parameters
$string
Returns
mixed|string

Definition at line 208 of file StringHelper.php.

Referenced by Seboettg\CiteProc\Util\StringHelperTest\testCamelCase2Hyphen().

◆ capitalizeAll()

static Seboettg\CiteProc\Util\StringHelper::capitalizeAll (   $text)
static
Parameters
$text
Returns
string

Definition at line 77 of file StringHelper.php.

Referenced by Seboettg\CiteProc\Styles\applyTextCase().

◆ capitalizeForTitle()

static Seboettg\CiteProc\Util\StringHelper::capitalizeForTitle (   $titleString)
static

◆ checkLowerCaseString()

static Seboettg\CiteProc\Util\StringHelper::checkLowerCaseString (   $string)
static
Parameters
$string
Returns
bool

Definition at line 219 of file StringHelper.php.

Referenced by Seboettg\CiteProc\Util\StringHelperTest\testCheckLowerCase().

◆ checkUpperCaseString()

static Seboettg\CiteProc\Util\StringHelper::checkUpperCaseString (   $string)
static
Parameters
$string
Returns
bool

Definition at line 228 of file StringHelper.php.

Referenced by Seboettg\CiteProc\Styles\applyTextCase(), and Seboettg\CiteProc\Util\StringHelperTest\testCheckUpperCase().

◆ clearApostrophes()

static Seboettg\CiteProc\Util\StringHelper::clearApostrophes (   $string)
static
Parameters
$string
Returns
mixed

Definition at line 237 of file StringHelper.php.

Referenced by Seboettg\CiteProc\Rendering\Layout\render().

◆ implodeAndPreventConsecutiveChars()

static Seboettg\CiteProc\Util\StringHelper::implodeAndPreventConsecutiveChars (   $delimiter,
  $arrayOfStrings 
)
static
Parameters
string$delimiter
string[]$arrayOfStrings
Returns
string;

Definition at line 159 of file StringHelper.php.

References Seboettg\CiteProc\Util\StringHelper\mb_strrev().

Referenced by Seboettg\CiteProc\Rendering\Group\formatting().

◆ initializeBySpaceOrHyphen()

static Seboettg\CiteProc\Util\StringHelper::initializeBySpaceOrHyphen (   $string,
  $initializeSign 
)
static
Parameters
$string
$initializeSign
Returns
string

Definition at line 180 of file StringHelper.php.

References Seboettg\CiteProc\CiteProc\getContext(), and Seboettg\CiteProc\Util\StringHelper\isLatinString().

◆ isAsianString()

static Seboettg\CiteProc\Util\StringHelper::isAsianString (   $string)
static
Parameters
$string
Returns
bool

Definition at line 288 of file StringHelper.php.

◆ isCyrillicString()

static Seboettg\CiteProc\Util\StringHelper::isCyrillicString (   $string)
static
Parameters
$string
Returns
bool

Definition at line 279 of file StringHelper.php.

Referenced by Seboettg\CiteProc\Util\StringHelperTest\testIsCyrillicString().

◆ isLatinString()

static Seboettg\CiteProc\Util\StringHelper::isLatinString (   $string)
static

◆ keepLowerCase()

static Seboettg\CiteProc\Util\StringHelper::keepLowerCase (   $word)
static
Parameters
$word
Returns
bool

Definition at line 118 of file StringHelper.php.

Referenced by Seboettg\CiteProc\Util\StringHelper\capitalizeForTitle().

◆ mb_strrev()

static Seboettg\CiteProc\Util\StringHelper::mb_strrev (   $string)
static

◆ mb_ucfirst()

static Seboettg\CiteProc\Util\StringHelper::mb_ucfirst (   $string,
  $encoding = 'UTF-8' 
)
static

◆ removeBrackets()

static Seboettg\CiteProc\Util\StringHelper::removeBrackets (   $datePart)
static

removes all kind of brackets from a given string

Parameters
$datePart
Returns
mixed

Definition at line 298 of file StringHelper.php.

◆ replaceOuterQuotes()

static Seboettg\CiteProc\Util\StringHelper::replaceOuterQuotes (   $text,
  $outerOpenQuote,
  $outerCloseQuote,
  $innerOpenQuote,
  $innerCloseQuote 
)
static

replaces outer quotes of $text by given inner quotes

Parameters
$text
$outerOpenQuote
$outerCloseQuote
$innerOpenQuote
$innerCloseQuote
Returns
string

Definition at line 252 of file StringHelper.php.

Referenced by Seboettg\CiteProc\Util\StringHelperTest\testReplaceOuterQuotes().

Field Documentation

◆ ADJECTIVES

const Seboettg\CiteProc\Util\StringHelper::ADJECTIVES
Initial value:
= [
'down', 'up'
]

Definition at line 41 of file StringHelper.php.

◆ ADVERBS

const Seboettg\CiteProc\Util\StringHelper::ADVERBS
Initial value:
= [
'yet', 'so', 'just', 'only'
]

Definition at line 33 of file StringHelper.php.

◆ ARTICLES

const Seboettg\CiteProc\Util\StringHelper::ARTICLES
Initial value:
= [
'a', 'an', 'the'
]

Definition at line 29 of file StringHelper.php.

◆ CLOSING_QUOTE

const Seboettg\CiteProc\Util\StringHelper::CLOSING_QUOTE = "”"

closing quote sign

Definition at line 71 of file StringHelper.php.

◆ CONJUNCTIONS

const Seboettg\CiteProc\Util\StringHelper::CONJUNCTIONS
Initial value:
= [
'nor', 'so', 'and', 'or'
]

Definition at line 37 of file StringHelper.php.

◆ ISO_ENCODINGS

const Seboettg\CiteProc\Util\StringHelper::ISO_ENCODINGS
Initial value:
= [
'ISO-8859-1',
'ISO-8859-2',
'ISO-8859-3',
'ISO-8859-4',
'ISO-8859-5',
'ISO-8859-6',
'ISO-8859-7',
'ISO-8859-8',
'ISO-8859-9',
'ISO-8859-10',
'ISO-8859-11',
'ISO-8859-13',
'ISO-8859-14',
'ISO-8859-15',
'ISO-8859-16'
]

Definition at line 45 of file StringHelper.php.

◆ OPENING_QUOTE

const Seboettg\CiteProc\Util\StringHelper::OPENING_QUOTE = "“"

opening quote sign

Definition at line 66 of file StringHelper.php.

◆ PREPOSITIONS

const Seboettg\CiteProc\Util\StringHelper::PREPOSITIONS
Initial value:
= [
'on', 'in', 'at', 'since', 'for', 'ago', 'before', 'to', 'past', 'till', 'until', 'by', 'under', 'below',
'over', 'above', 'across', 'through', 'into', 'towards', 'onto', 'from', 'of', 'off', 'about', 'via'
]

Definition at line 24 of file StringHelper.php.


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