Class Rope
Class Rope.
Like a string, but better.
- Rope is a wrapper of a PHP string.
- Most operations should be safe for international strings.
- Operations are immutable; They will return a new instance of a Rope.
- Chromabits\Nucleus\Foundation\BaseObject implements Iterator
- Chromabits\Nucleus\Strings\Rope implements Chromabits\Nucleus\Data\Interfaces\FunctorInterface, Chromabits\Nucleus\Data\Interfaces\MonoidInterface, Chromabits\Nucleus\Data\Interfaces\ListableInterface, Chromabits\Nucleus\Data\Interfaces\MappableInterface
Namespace: Chromabits\Nucleus\Strings
Package: Chromabits\Nucleus\Strings
Author: Eduardo Trujillo ed@chromabits.com
Located at Chromabits/Nucleus/Strings/Rope.php
Package: Chromabits\Nucleus\Strings
Author: Eduardo Trujillo ed@chromabits.com
Located at Chromabits/Nucleus/Strings/Rope.php
public
|
#
__construct( string|
Construct an instance of a Rope. |
public static
|
|
public static
|
|
public static
|
|
public static
|
|
public
string
|
|
public
string
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public static
|
#
of( string|
Construct an instance of a Rope. |
public
|
|
public
boolean
|
|
public
|
#
upperWords( string $delimiters = " \t\r\n\f\v" )
Return the string with all the words in upper case. |
public
integer
|
|
public
|
|
public
boolean
|
#
beginsWith( string|
Returns true if the string begins with the provided string. |
public
boolean
|
#
endsWith( string|
Returns true if the string ends with the provided string. |
public
boolean
|
#
contains( string|
Returns true if the string contains the provided string. |
public
|
|
public
string[]
|
|
public
|
|
public
string
|
|
public
|
|
public
|
|
public
|
#
append(
Append another semigroup and return the result. |
public
|
|
public
|
|
public
boolean
|
__get(),
__set(),
current(),
key(),
next(),
rewind(),
valid()
|
string |
ENCODING_UTF8
|
#
'UTF-8'
|
protected static
array
|
$snakeCache
The cache of snake-cased words. |
#
[]
|
protected static
array
|
$camelCache
The cache of camel-cased words. |
#
[]
|
protected static
array
|
$studlyCache
The cache of studly-cased words. |
#
[]
|
protected
string
|
$contents
Internal string. |
|
protected
string
|
$encoding
Name of the encoding to use. |