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
    • ContentRssCreator
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • mpAutoloaderClassMap
  • None
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SearchSolr
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob
  • Smarty
    • Cacher
    • Compiler
    • Config
    • Debug
    • PluginsBlock
    • PluginsFilter
    • PluginsFunction
    • PluginsInternal
    • PluginsModifier
    • PluginsModifierCompiler
    • PluginsShared
    • Security
    • Template
    • TemplateResources
  • Swift
    • ByteStream
    • CharacterStream
    • Encoder
    • Events
    • KeyCache
    • Mailer
    • Mime
    • Plugins
    • Transport

Classes

  • cApiPathresolveCacheHelper
  • cArray
  • cArticleCollector
  • cDirHandler
  • cFileHandler
  • cHTMLInputSelectElement
  • cIterator
  • cString
  • cZipArchive
  • UI_Config_Table
  • Overview
  • Package
  • Class
  • Todo
  • Download

Class cString

String helper class.

Package: Core\Util
Copyright: four for business AG <www.4fb.de>
License: http://www.contenido.org/license/LIZENZ.txt
Author: Murat Purc murat@purc.de
Located at classes/class.string.php
Methods summary
public static string
# iReplaceOnce( string $find, string $replace, string $subject )

Replaces a string only once

Replaces a string only once

Caution: This function only takes strings as parameters, not arrays!

Parameters

$find
String to find
$replace
String to replace
$subject
String to process

Returns

string
Processed string
public static string
# iReplaceOnceReverse( string $find, string $replace, string $subject )

Replaces a string only once, in reverse direction

Replaces a string only once, in reverse direction

Caution: This function only takes strings as parameters, not arrays!

Parameters

$find
String to find
$replace
String to replace
$subject
String to process

Returns

string
Processed string
public static string
# posReverse( string $haystack, string $needle, integer $start = 0 )

Finds a string position in reverse direction

Finds a string position in reverse direction

NOTE: The original strrpos-Function of PHP4 only finds a single character as needle.

Parameters

$haystack
String to search in
$needle
String to search for
$start
Offset

Returns

string
Processed string
public static string|array
# addSlashes( string|array $value )

Adds slashes to passed variable or array.

Adds slashes to passed variable or array.

Parameters

$value
Either a string or a multi-dimensional array of values

Returns

string|array
public static string|array
# stripSlashes( string|array $value )

Removes slashes from passed variable or array.

Removes slashes from passed variable or array.

Parameters

$value
Either a string or a multi-dimensional array of values

Returns

string|array
public static boolean
# endsWith( string $haystack, string $needle )

Checks if the string haystack ends with needle

Checks if the string haystack ends with needle

Parameters

$haystack
The string to check
$needle
The string with which it should end

Returns

boolean
public static boolean
# contains( string $haystack, string $needle )

Returns true if needle can be found in haystack

Returns true if needle can be found in haystack

Parameters

$haystack
String to be searched
$needle
String to search for

Returns

boolean
public static string
# strstr( string $haystack, string $needle, string $beforeNeedle = false )

Implementation of PHP 5.3's strstr with beforeNeedle

Implementation of PHP 5.3's strstr with beforeNeedle

Parameters

$haystack
String to be searched
$needle
String to search for
$beforeNeedle
If true, return everything BEFORE needle

Returns

string

Link

http://php.net/manual/de/function.strstr.php
public static boolean
# validateDateFormat( string $format )

This function checks if a given format is accepted by php's date function

This function checks if a given format is accepted by php's date function

Parameters

$format
format according to date function specification

Returns

boolean
true if format is correct, false otherwise
CMS CONTENIDO 4.9.7 API documentation generated by ApiGen