2017 © Pedro Peláez
 

silverstripe-vendormodule silverstripe-dbstringextras

Adds extra methods to Silverstripe DBStrings to help manipulate them.

image

gorriecoe/silverstripe-dbstringextras

Adds extra methods to Silverstripe DBStrings to help manipulate them.

  • Thursday, July 26, 2018
  • by gorriecoe
  • Repository
  • 1 Watchers
  • 1 Stars
  • 57 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 128 % Grown

The README.md

Silverstripe DBString Extras

Adds extra methods to Silverstripe DBStrings to help manipulate them., (*1)

Installation

Composer is the recommended way of installing SilverStripe modules., (*2)

composer require gorriecoe/silverstripe-dbstringextras

Requirements

  • silverstripe/framework ^4.0

Maintainers

Documentation

StrReplace

Replace all occurrences of the search string with the replacement string., (*3)

PHP, (*4)

$this->obj('MyString')->StrReplace('Search value', 'Replacement value')

Template, (*5)

{$MyString.StrReplace('Search value', 'Replacement value')}

Input = Output, (*6)

Ullamcorper Tellus Search value Egestas
=
Ullamcorper Tellus Replacement value Egestas

Nice

Converts this camel case and hyphenated string to a space separated string., (*7)

PHP, (*8)

$this->obj('MyString')->Nice()

Template, (*9)

{$MyString.Nice}

Input = Output, (*10)

UllamCorper1tspHTML_-_Bibendum-egestas-1-1
=
Ullam Corper 1tsp HTML - Bibendum egestas 1-1

Hyphenate

Converts this camel case string to a hyphenated, kebab or spinal case string., (*11)

PHP, (*12)

$this->obj('MyString')->Hyphenate()

Template, (*13)

{$MyString.Hyphenate}

Input = Output, (*14)

Ullamcorper Tellus Sollicitudin Bibendum Egestas
=
ullamcorper-tellus-sollicitudin-bibendum-egestas

RemoveSpaces

Removes spaces from this string., (*15)

PHP, (*16)

$this->obj('MyString')->RemoveSpaces()

Template, (*17)

{$MyString.RemoveSpaces}

Input = Output, (*18)

Ullamcorper Tellus Sollicitudin Bibendum Egestas
=
UllamcorperTellusSollicitudinBibendumEgestas

Highlight

Converts square brackets [] within this string to a spans with css class., (*19)

PHP, (*20)

$this->obj('MyString')->Highlight()

Template, (*21)

{$MyString.Highlight}
or
{$MyString.Highlight('MyClass')}

Input = Output, (*22)

Ullamcorper [Tellus] Sollicitudin Bibendum Egestas
=
Ullamcorper <span class="highlight">Tellus</span> Sollicitudin Bibendum Egestas

SplitLines

Separates this string by lines into an ArrayList., (*23)

Template, (*24)

<% loop MyString.SplitLines %>
    <div>
        {$Line}
    </div>
<% end_loop %>

Input = Output, (*25)

Maecenas sed diam eget risus varius blandit sit amet non magna.
Etiam porta sem malesuada magna mollis euismod.
=
<div>
    Maecenas sed diam eget risus varius blandit sit amet non magna.
</div>
<div>
    Etiam porta sem malesuada magna mollis euismod.
</div>

Explode

Separates this string by specified the delimiter., (*26)

Template, (*27)

<% loop String.Explode(',') %>
    <li>
        {$Value}
    </li>
<% end_loop %>

Input = Output, (*28)

Aenean,Purus,Dolor,Magna
=
<li>Aenean</li>
<li>Purus</li>
<li>Dolor</li>
<li>Magna</li>

The Versions

26/07 2018

dev-master

9999999-dev http://github.com/gorriecoe/silverstripe-dbstringextras

Adds extra methods to Silverstripe DBStrings to help manipulate them.

  Sources   Download

BSD-3-Clause

The Requires

 

by Gorrie Coe

silverstripe string dbstring

26/07 2018

1.1.2

1.1.2.0 http://github.com/gorriecoe/silverstripe-dbstringextras

Adds extra methods to Silverstripe DBStrings to help manipulate them.

  Sources   Download

BSD-3-Clause

The Requires

 

by Gorrie Coe

silverstripe string dbstring

09/05 2018

1.1.1

1.1.1.0 http://github.com/gorriecoe/silverstripe-dbstringextras

Adds extra methods to Silverstripe DBStrings to help manipulate them.

  Sources   Download

BSD-3-Clause

The Requires

 

by Gorrie Coe

silverstripe string dbstring

27/03 2018

1.1.0

1.1.0.0 http://github.com/gorriecoe/silverstripe-dbstringextras

Adds extra methods to Silverstripe DBStrings to help manipulate them.

  Sources   Download

BSD-3-Clause

The Requires

 

by Gorrie Coe

silverstripe string dbstring

13/03 2018

1.0.1

1.0.1.0 http://github.com/gorriecoe/silverstripe-dbstringextras

Adds extra methods to Silverstripe DBStrings to help manipulate them.

  Sources   Download

BSD-3-Clause

The Requires

 

by Gorrie Coe

silverstripe string dbstring

10/03 2018

1.0.0

1.0.0.0 http://github.com/gorriecoe/silverstripe-dbstringextras

Adds extra methods to Silverstripe DBStrings to help manipulate them.

  Sources   Download

BSD-3-Clause

The Requires

 

by Gorrie Coe

silverstripe string dbstring