method charAt [line 45]
mixed charAt(
int
$position)
|
|
Returns the character at the given position.
Returns the character at the given position.
If there is no character false will be returned.
Usage:
$string =
new String('This is the new string.');
Tags:
Parameters:
method charCodeAt [line 68]
mixed charCodeAt(
int
$position)
|
|
Returns the ASCII-Code for the character at the given position.
Returns the ASCII-Code for the character at the given position.
If there is no character false will be returned.
Usage:
$string =
new String('This is the new string.');
Tags:
Parameters:
method concat [line 94]
Wrapper for String->add().
Wrapper for String->add().
Just defined because it is available in javascript.
Usage:
$string =
new String('This is the new string.');
$string =
$string->concat('added string');
Tags:
Parameters:
method fromCharCode [line 114]
Takes an integer array, creates for each value the character and adds it to the string.
Takes an integer array, creates for each value the character and adds it to the string.
Important: The string is completely overwritten by this method!
Usage:
$string =
new String('This is the new string.');
Tags:
Parameters:
method indexOf [line 144]
mixed indexOf(
string
$search)
|
|
Looks for the first occurence of the given string and returns the position of the first character.
Looks for the first occurence of the given string and returns the position of the first character.
If the string is not found false will be returned.
Usage:
$string =
new String('This is the new string.');
$string =
$string->indexOf('search');
Tags:
Parameters:
method lastIndexOf [line 161]
mixed lastIndexOf(
string
$search)
|
|
Looks for the last occurence of the given string and returns the position of the first character.
Looks for the last occurence of the given string and returns the position of the first character.
If the string is not found false will be returned.
Usage:
$string =
new String('This is the new string.');
Tags:
Parameters:
method length [line 175]
Counts all characters of the string and returns the sum of them.
Counts all characters of the string and returns the sum of them.
Usage:
$string =
new String('This is the new string.');
Tags:
method match [line 190]
array match(
string
$regExp)
|
|
This is a wrapper for preg_match_all() and returns every found match for the given regular expression.
This is a wrapper for preg_match_all() and returns every found match for the given regular expression.
Usage:
$string =
new String('This is the new string.');
$string =
$string->match('/search/');
Tags:
Parameters:
method replace [line 208]
This is a wrapper for preg_replace and replaces every occurence of the given regular expression with the given replacement.
This is a wrapper for preg_replace and replaces every occurence of the given regular expression with the given replacement.
Usage:
$string =
new String('This is the new string.');
$string =
$string->replace('/search/', 'replace');
Tags:
Parameters:
method search [line 228]
mixed search(
string
$regExp)
|
|
This method searches for the given regular expression and returns the position of the first character of it, when found.
This method searches for the given regular expression and returns the position of the first character of it, when found.
If nothing is found false will be returned.
Usage:
$string =
new String('This is the new string.');
$string =
$string->search('/search/');
Tags:
Parameters:
method slice [line 251]
string slice(
int
$start, [int
$end = null])
|
|
This is a wrapper for JavascriptString->substring().
This is a wrapper for JavascriptString->substring().
Usage:
$string =
new String('This is the new string.');
$string =
$string->slice(10, 20);
Tags:
Parameters:
method split [line 266]
array split(
mixed
$seperator)
|
|
Splits the existent string at the given seperator and returns the parts as array.
Splits the existent string at the given seperator and returns the parts as array.
Usage:
$string =
new String('This is the new string.');
$string =
$string->split(' ');
Tags:
Parameters:
method substr [line 284]
string substr(
int
$start, [int
$length = null])
|
|
Returns the string from the given starting position with the given length.
Returns the string from the given starting position with the given length.
If no end position is given everything from the starting position is returned.
Usage:
$string =
new String('This is the new string.');
$string =
$string->substr(10, 20);
Tags:
Parameters:
method substring [line 310]
string substring(
int
$start, [int
$end = null])
|
|
Returns the string from the given starting position to the given end position.
Returns the string from the given starting position to the given end position.
If no end position is given everything from the starting position is returned.
Usage:
$string =
new String('This is the new string.');
Tags:
Parameters:
method toLowerCase [line 333]
Transforms every character in the existent string to his lower version.
Transforms every character in the existent string to his lower version.
Usage:
$string =
new String('This is the new string.');
Tags:
method toUpperCase [line 350]
Transforms every character in the existent string to his upper version.
Transforms every character in the existent string to his upper version.
Usage:
$string =
new String('This is the new string.');
Tags: