Overview

Packages

  • CONTENIDO
  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • mpAutoloaderClassMap
  • None
  • PHP
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SIWECOS
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob

Classes

  • cApiPathresolveCacheHelper
  • cArray
  • cArticleCollector
  • cDirHandler
  • cFileHandler
  • cHTMLInputSelectElement
  • cIterator
  • cString
  • cStringMultiByteWrapper
  • cZipArchive
  • UI_Config_Table
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class cStringMultiByteWrapper

Wrapper class for mbstring functions to be used with strings.

Each method is a wrapper for a mbstring function that implements a fallback to the regular string function if the mbstring function does not exist or the mbstring extension itself is not available.

Direct known subclasses

cString
Package: Core\Util
Copyright: four for business AG <www.4fb.de>
License: http://www.contenido.org/license/LIZENZ.txt
Author: Frederic Schneider <frederic.schneider@4fb.de>
Author: Marcus Gnaß <marcus.gnass@4fb.de>
Todo: add mb_chr(), mb_ord()
Located at classes/class.string.multi.byte.wrapper.php
Methods summary
protected static boolean
# _functionExists( string $functionName )

Checks if a given mbstring function exists.

Checks if a given mbstring function exists.

Caches informations about existing mbstring functions for better performance.

Parameters

$functionName
string
$functionName

Returns

boolean
protected static string
# _getEncoding( string|null $encoding = null )

Determines multi byte encoding to be used for various mbstring functions.

Determines multi byte encoding to be used for various mbstring functions.

If NULL is given the encoding for the current language is used which tends to be awfully slow as it requires a database lookup!

If none could be determined the current set encoding is used.

Parameters

$encoding
string|null
$encoding - give a string to use a specific encoding - give null to use the encoding of the current language

Returns

string
public static string
# toLowerCase( string $string, string|null $encoding = null )

Make a string lowercase

Make a string lowercase

Parameters

$string
string
$string The string being lowercased
$encoding
string|null
$encoding encoding parameter, standard: cRegistry::getEncoding()

Returns

string
with all alphabetic characters converted to lowercases

Link

http://php.net/manual/de/function.mb-strtolower.php
public static string
# toUpperCase( string $string, string|null $encoding = null )

Make a string uppercase

Make a string uppercase

Parameters

$string
string
$string The string being uppercased
$encoding
string|null
$encoding encoding parameter, standard: cRegistry::getEncoding()

Returns

string
with all alphabetic characters converted to uppercases

Link

http://php.net/manual/de/function.mb-strtoupper.php
public static integer
# getStringLength( string $string, string|null $encoding = null )

Get string length

Get string length

Parameters

$string
string
$string The string being checked for length
$encoding
string|null
$encoding encoding parameter, standard: cRegistry::getEncoding()

Returns

integer
Returns the number of characters

Link

http://php.net/manual/de/function.mb-strlen.php
public static string
# getPartOfString( string $string, integer $start, integer $length = null, string|null $encoding = null )

Get string length

Get string length

Parameters

$string
string
$string The string to extract the substring form
$start
integer
$start
$length
integer
$length [Optional] Maximum number of characters to use from $string, standard is NULL
$encoding
string|null
$encoding encoding parameter, standard: cRegistry::getEncoding()

Returns

string
Returns the number of characters

Link

http://php.net/manual/de/function.mb-substr.php
public static integer
# countSubstring( string $haystack, string $needle, string|null $encoding = null )

Count the number of substring occurences

Count the number of substring occurences

Parameters

$haystack
string
$haystack The string being checked
$needle
string
$needle The string being found
$encoding
string|null
$encoding encoding parameter, standard: cRegistry::getEncoding()

Returns

integer
The number of times the needle substring occurs in the haystack string.

Link

http://php.net/manual/de/function.mb-substr-count.php
public static boolean
# mail( string $to, string $subject, string $message, string $additional_headers = null, string $additional_parameter = null )

Send encoded mail

Send encoded mail

Parameters

$to
string
$to The mail addresses being sent to (multiple recipents comma separated)
$subject
string
$subject The subject of the mail
$message
string
$message The message of the mail
$additional_headers
string
$additional_headers [Optional]
$additional_parameter
string
$additional_parameter [Optional]

Returns

boolean
true or false

Link

http://php.net/manual/de/function.mb-send-mail.php
public static integer
# findFirstPos( string $haystack, string $needle, integer $offset = 0, string|null $encoding = null )

Find the position of first occurence of string in a string

Find the position of first occurence of string in a string

Parameters

$haystack
string
$haystack
$needle
string
$needle
$offset
integer
$offset [Optional]
$encoding
string|null
$encoding encoding parameter, standard: cRegistry::getEncoding()

Returns

integer
Returns the numeric position of the first occurrence of needle in the haystack string

Link

http://php.net/manual/de/function.mb-strpos.php
public static integer
# findLastPos( string $haystack, string $needle, integer $offset = 0, string|null $encoding = null )

Find the position of last occurence of string in a string

Find the position of last occurence of string in a string

Parameters

$haystack
string
$haystack
$needle
string
$needle
$offset
integer
$offset [Optional]
$encoding
string|null
$encoding encoding parameter, standard: cRegistry::getEncoding()

Returns

integer
Returns the numeric position of the last occurrence of needle in the haystack string

Link

http://php.net/manual/de/function.mb-strrpos.php
public static integer
# findFirstPosCI( string $haystack, string $needle, integer $offset = 0, string|null $encoding = null )

Finds position of first occurrence of a string within another, case insensitive

Finds position of first occurrence of a string within another, case insensitive

Parameters

$haystack
string
$haystack
$needle
string
$needle
$offset
integer
$offset [Optional]
$encoding
string|null
$encoding encoding parameter, standard: cRegistry::getEncoding()

Returns

integer
Returns the numeric position of the first occurrence of needle in the haystack string

Link

http://php.net/manual/de/function.mb-stripos.php
public static integer
# findLastPosCI( string $haystack, string $needle, integer $offset = 0, string|null $encoding = null )

Finds position of last occurrence of a string within another, case insensitive

Finds position of last occurrence of a string within another, case insensitive

Parameters

$haystack
string
$haystack
$needle
string
$needle
$offset
integer
$offset [Optional]
$encoding
string|null
$encoding encoding parameter, standard: cRegistry::getEncoding()

Returns

integer
Returns the numeric position of the last occurrence of needle in the haystack string

Link

http://php.net/manual/de/function.mb-strripos.php
public static string
# findFirstOccurrenceCI( string $haystack, string $needle, boolean $before_needle = false, string|null $encoding = null )

Finds first occurrence of a string within another, case insensitive

Finds first occurrence of a string within another, case insensitive

Parameters

$haystack
string
$haystack
$needle
string
$needle
$before_needle
boolean
$before_needle [Optional]
$encoding
string|null
$encoding encoding parameter, standard: cRegistry::getEncoding()

Returns

string
Returns the portion of haystack, or FALSE if needle is not found.

Link

http://php.net/manual/de/function.mb-stristr.php
public static string
# findLastOccurrence( string $haystack, string $needle, boolean $part = false, string|null $encoding = null )

Finds first occurrence of a string within another, case insensitive

Finds first occurrence of a string within another, case insensitive

Parameters

$haystack
string
$haystack
$needle
string
$needle
$part
boolean
$part [Optional]
$encoding
string|null
$encoding encoding parameter, standard: cRegistry::getEncoding()

Returns

string
Returns the portion of haystack, or FALSE if needle is not found.

Link

http://php.net/manual/de/function.mb-strrchr.php
public static integer
# ereg( string $pattern, string $string, array & $regs = array() )

Regular expression match

Regular expression match

Parameters

$pattern
string
$pattern
$string
string
$string
$regs
array
$regs [Optional]

Returns

integer

Link

http://php.net/manual/de/function.mb-ereg.php
public static integer
# eregi( string $pattern, string $string, array & $regs = array() )

Regular expression match ignoring case

Regular expression match ignoring case

Parameters

$pattern
string
$pattern
$string
string
$string
$regs
array
$regs [Optional]

Returns

integer
Returns the byte length of the matched string if a match for pattern was found in string

Link

http://php.net/manual/de/function.mb-eregi.php
public static false|string
# ereg_replace( string $pattern, string $replacement, string $string, string $option = 'msr' )

Replace regular expression

Replace regular expression

Parameters

$pattern
string
$pattern
$replacement
string
$replacement
$string
string
$string
$option
string
$option [Optional]

Returns

false|string
Returns the byte length of the matched string if a match for pattern was found in string

Link

http://php.net/manual/de/function.mb-ereg-replace.php
public static false|string
# eregi_replace( string $pattern, string $replacement, string $string, string $option = 'msr' )

Replace regular expression ignoring case

Replace regular expression ignoring case

Parameters

$pattern
string
$pattern
$replacement
string
$replacement
$string
string
$string
$option
string
$option [Optional]

Returns

false|string
Returns the byte length of the matched string if a match for pattern was found in string

Link

http://php.net/manual/de/function.mb-eregi-replace.php
public static string[]
# split( string $pattern, string $string, integer $limit = -1 )

Split string using regular expression

Split string using regular expression

Parameters

$pattern
string
$pattern
$string
string
$string
$limit
integer
$limit [Optional]

Returns

string[]
The result as an array

Link

http://php.net/manual/de/function.mb-split.php
CMS CONTENIDO 4.10.1 API documentation generated by ApiGen 2.8.0