core
[ class tree: core ] [ index: core ] [ all elements ]

Class: Strings

Source Location: /core/Strings.class.php

Class Overview

ABSTObject
   |
   --Strings

Static methods


Author(s):

Version:

  • 0.1.96

Copyright:

  • Copyright (c) 2003 Daniel Plücken <daniel@debakel.net>

    This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License.

    This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Methods


Inherited Methods

Class: ABSTObject

ABSTObject::printComplexData()
Prints out the more complex data by the given array.
ABSTObject::printPrimitiveData()
Prints out the primitive data by the given arrays.
ABSTObject::printStructure()
Prints out the Structure of this Object.
ABSTObject::same()
Checks whether the passed object reference points to this object.
ABSTObject::sameReferences()
Compares two references whether they points to the same object

Class Details

[line 50]
Static methods



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  0.1.96
copyright:  

Copyright (c) 2003 Daniel Plücken <daniel@debakel.net>

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

license:  GNU Lesser General Public License


[ Top ]


Class Methods


static method endsWith [line 325]

static boolean endsWith( string $string, string $what)

Returns whether the given string ends with substring $what.



Tags:

version:  1.0
since:  0.1.0
access:  public


Parameters:

string   $string   The string which should be checked if it ends with $what
string   $what   The substring which will be compared with the end of $string

[ Top ]

static method escapeLineBreaks [line 174]

static string escapeLineBreaks( string $text)

Escapes all line breaks in a string with \.



Tags:

version:  1.0
since:  0.1.8
access:  public


Parameters:

string   $text   The string which should be modified.

[ Top ]

static method explodeReplace [line 354]

static string explodeReplace( string $string, $separator, string $beforeRPL, string $behindRPL, [ $separatorRPL = ""], string $seperator, string $seperatorRPL)

Splits a string by $separator. Every extracted piece will be concatenate with $beforeRPL at the beginning and $behindRPL at the ending of its own.

At least all pieces will put together to a new string. Optionally the pieces will be separate by a new separator which is given with the fifth parameter.




Tags:

version:  1.1
since:  0.1.1
access:  public


Parameters:

string   $string  
string   $seperator  
string   $beforeRPL  
string   $behindRPL  
string   $seperatorRPL  
   $separator  
   $separatorRPL  

[ Top ]

static method getFirstWord [line 387]

static string getFirstWord( string $string)

Returns the first Word from a text.



Tags:

version:  1.1
since:  0.1.0
access:  public


Parameters:

string   $string   The string that schould be extended.

[ Top ]

static method getRandomPassword [line 409]

static string getRandomPassword( [integer $digits = 8])

Returns a coincidence created password with given digits.



Tags:

version:  1.0
since:  0.1.2
access:  public


Parameters:

integer   $digits  

[ Top ]

static method getRandomWord [line 452]

static string getRandomWord( [integer $digits = 8])

Returns a coincidence created word with given digits.



Tags:

version:  1.0
since:  0.1.2
access:  public


Parameters:

integer   $digits  

[ Top ]

static method leadingChar [line 273]

static string leadingChar( char $char, string $string, integer $digits)

Adds $char to string until string has the length of $digits.

Example: Strings::leadingChar( "0", "5", 4 ); returns "0005"




Tags:

version:  1.1
since:  0.1.0
access:  public


Parameters:

char   $char   The char that should add to $string.
string   $string   The string that schould be extended.
integer   $digits   The count of digits $string schould get.

[ Top ]

static method listReplace [line 150]

static string listReplace( array $array, string $string)

Replaces substrings in string by the matching keys of an array to the value of that key.

Example:

  1.  $str listReplace(
  2.                   array(
  3.                           "ü" => "ue",
  4.                           "aniel" => "."
  5.                        ),
  6.                   "Daniel Plücken"
  7.                     );
  8.  
  9.  echo $str;

Puts out "D. Pluecken".




Tags:

version:  1.0
since:  0.1.9
access:  public


Parameters:

array   $array   The array that holds the replace list.
string   $string   The string which should be modified.

[ Top ]

static method parseParam [line 489]

static void parseParam( string $string, [string $kind = "ALL"])

Interprets arguments given by an URL.



Tags:

version:  1.0
since:  0.1.4
access:  public


Parameters:

string   $string  
string   $kind  

[ Top ]

static method pregpos [line 71]

static integer pregpos( string $haystack, string $needle, [string $offset = 0])

Functions like strpos( string haystack, string needle [, int offset] ), but you can use a regular expression as needle.

BEWARE: lookahead, lookbehind and all chars itentified by their position will NOT function, because of the intern relay to the function strpos!




Tags:

version:  1.0
since:  0.1.0
access:  public


Parameters:

string   $haystack  
string   $needle  
string   $offset  

[ Top ]

static method reduceWhiteSpace [line 246]

static string reduceWhiteSpace( string $text)

Reduces in series lying spaces to only one space. Also all spaces at the beginning of a line will be removed.



Tags:

version:  1.1
since:  0.1.0
access:  public


Parameters:

string   $text   The string which should be modified.

[ Top ]

static method removeLineBreaks [line 197]

static string removeLineBreaks( string $text)

Removes all line breaks in a string.



Tags:

version:  1.0
since:  0.1.0
access:  public


Parameters:

string   $text   The string which should be modified.

[ Top ]

static method removeWhiteSpace [line 220]

static string removeWhiteSpace( string $text)

Removes all white spaces including tabs and line breaks in a string.



Tags:

version:  1.0
since:  0.1.0
access:  public


Parameters:

string   $text   The string which should be modified.

[ Top ]

static method startsWith [line 301]

static boolean startsWith( string $string, string $what)

Returns whether the given string begins with substring $what.



Tags:

version:  1.1
since:  0.1.0
access:  public


Parameters:

string   $string   The string which should be checked if it starts with $what
string   $what   The substring which will be compared with the beginning of $string

[ Top ]

static method strToUpper [line 101]

static string strToUpper( string $str)

Make a string uppercase atleast for ISO-8859-1 (Latin 1) full with all special characters.



Tags:

version:  1.0
see:  78498
since:  0.1.95
access:  public


Parameters:

string   $str  

[ Top ]


Documentation generated on Thu, 05 Jun 2008 19:15:08 +0200 by phpDocumentor 1.4.1