File/functions/string_functions.php

Description

CodeIgniter

An open source application development framework for PHP 4.3.2 or newer

Functions
alternator (line 340)

Alternator

Allows strings to be alternated. See docs...

  • access: public
string alternator ([string 0 = (as many parameters as needed)])
  • string 0: (as many parameters as needed)
escape (line 93)

Escape Input

Prepara una/s cadena/s para ser enviada/s al HTML.

  • return: string or array
  • access: public
mixed escape (mixed $str, [string $charset = 'UTF-8'])
  • string $charset
  • mixed $str: string or array $str
escape_input (line 132)

Escape Input

Prepara una/s cadena/s para ser enviada/s a un input.

  • return: string or array
  • access: public
mixed escape_input (mixed $str, [string $charset = 'UTF-8'])
  • string $charset
  • mixed $str: string or array $str
escape_jsvar (line 167)

Escape Input

Prepara una/s cadena/s para ser enviada/s a una variable javascript.

  • return: string or array
  • access: public
mixed escape_jsvar (mixed $str, [string $charset = 'UTF-8'])
  • string $charset
  • mixed $str: string or array $str
ibm850_ansi (line 420)

Convierte una cadena en IBM850 a ANSI

  • access: public
string ibm850_ansi (string $cStr)
  • string $cStr
quotes_to_entities (line 219)

Quotes to Entities

Converts single and double quotes to entities

  • access: public
string quotes_to_entities (string $str)
  • string $str
random_string (line 296)

Create a Random String

Useful for generating passwords or hashes.

  • access: public
string random_string ([string $type = 'alnum'], [integer $len = 8])
  • string $type: type of random string. Options: alunum, numeric, nozero, unique
  • integer $len: number of characters
reduce_double_slashes (line 244)

Reduce Double Slashes

Converts double slashes in a string to a single slash, except those found in http://

http://www.some-site.com//index.php

becomes:

http://www.some-site.com/index.php

  • access: public
string reduce_double_slashes (string $str)
  • string $str
reduce_multiples (line 270)

Reduce Multiples

Reduces multiple instances of a particular character. Example:

Fred, Bill,, Joe, Jimmy

becomes:

Fred, Bill, Joe, Jimmy

  • access: public
string reduce_multiples (string $str, [string $character = ','], [bool $trim = FALSE])
  • string $str
  • string $character: the character you wish to reduce
  • bool $trim: TRUE/FALSE - whether to trim the character from the beginning/end
repeater (line 365)

Repeater function

  • access: public
string repeater (string $data, [integer $num = 1])
  • string $data
  • integer $num: number of repeats
string_ai (line 399)

String AI Devuelve una cadena formateada para usar en PREG de modo que sea insensitiva a acentos.

Funciona en UTF8

  • access: public
string string_ai (string $str)
  • string $str
strip_quotes (line 201)

Strip Quotes

Removes single and double quotes from a string

  • access: public
string strip_quotes (string $str)
  • string $str
strip_returns (line 381)

Strip Returns Quita los retornos de carro y saltos de linea de la cadena $str.

  • access: public
string strip_returns (string $str)
  • string $str
strip_slashes (line 62)

Strip Slashes

Removes slashes contained in a string or in an array

  • return: string or array
  • access: public
mixed strip_slashes (mixed $str)
  • mixed $str: string or array
trim_slashes (line 44)

Trim Slashes

Removes any leading/traling slashes from a string:

/this/that/theother/

becomes:

this/that/theother

  • access: public
string trim_slashes (string $str)
  • string $str

Documentation generated on Tue, 22 Nov 2011 13:28:59 -0200 by phpDocumentor 1.4.3