[ Index ]

PHP Cross Reference of phpBB-3.3.14-deutsch

title

Body

[close]

/vendor/s9e/regexp-builder/src/Passes/ -> MergePrefix.php (summary)

(no description)

Copyright: Copyright (c) 2016-2022 The s9e authors
License: http://www.opensource.org/licenses/mit-license.php The MIT License
File Size: 107 lines (2 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

MergePrefix:: (5 methods):
  runPass()
  getPrefixLength()
  getStringsByPrefix()
  mergeStrings()
  stringsMatch()


Class: MergePrefix  - X-Ref

Replaces (?:axx|ayy) with a(?:xx|yy)

runPass(array $strings)   X-Ref
{@inheritdoc}


getPrefixLength(array $strings)   X-Ref
Get the number of leading elements common to all given strings

param: array[] $strings
return: integer

getStringsByPrefix(array $strings)   X-Ref
Return given strings grouped by their first element

NOTE: assumes that this pass is run before the first element of any string could be replaced

param: array[] $strings
return: array[]

mergeStrings(array $strings)   X-Ref
Merge given strings into a new single string

param: array[] $strings
return: array

stringsMatch(array $strings, int $pos)   X-Ref
Test whether all given strings' elements match at given position

param: array[] $strings
param: integer $pos
return: bool



Generated: Mon Nov 25 19:05:08 2024 Cross-referenced by PHPXref 0.7.1