PHPackages                             gorriecoe/silverstripe-dbstringextras - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. gorriecoe/silverstripe-dbstringextras

ActiveSilverstripe-vendormodule[Utility &amp; Helpers](/categories/utility)

gorriecoe/silverstripe-dbstringextras
=====================================

Adds extra methods to Silverstripe DBStrings to help manipulate them.

1.1.2(7y ago)45.0k1[1 PRs](https://github.com/gorriecoe/silverstripe-dbstringextras/pulls)1BSD-3-ClausePHP

Since Mar 9Pushed 1y ago1 watchersCompare

[ Source](https://github.com/gorriecoe/silverstripe-dbstringextras)[ Packagist](https://packagist.org/packages/gorriecoe/silverstripe-dbstringextras)[ Docs](http://github.com/gorriecoe/silverstripe-dbstringextras)[ RSS](/packages/gorriecoe-silverstripe-dbstringextras/feed)WikiDiscussions master Synced yesterday

READMEChangelog (5)Dependencies (1)Versions (6)Used By (1)

Silverstripe DBString Extras
============================

[](#silverstripe-dbstring-extras)

Adds extra methods to Silverstripe DBStrings to help manipulate them.

Installation
------------

[](#installation)

Composer is the recommended way of installing SilverStripe modules.

```
composer require gorriecoe/silverstripe-dbstringextras

```

Requirements
------------

[](#requirements)

- silverstripe/framework ^4.0

Maintainers
-----------

[](#maintainers)

- [Gorrie Coe](https://github.com/gorriecoe)

Documentation
-------------

[](#documentation)

### StrReplace

[](#strreplace)

Replace all occurrences of the search string with the replacement string.

PHP

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

Template

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

```

Input = Output

```
Ullamcorper Tellus Search value Egestas
=
Ullamcorper Tellus Replacement value Egestas

```

### Nice

[](#nice)

Converts this camel case and hyphenated string to a space separated string.

PHP

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

Template

```
{$MyString.Nice}

```

Input = Output

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

```

### Hyphenate

[](#hyphenate)

Converts this camel case string to a hyphenated, kebab or spinal case string.

PHP

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

Template

```
{$MyString.Hyphenate}

```

Input = Output

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

```

### RemoveSpaces

[](#removespaces)

Removes spaces from this string.

PHP

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

Template

```
{$MyString.RemoveSpaces}

```

Input = Output

```
Ullamcorper Tellus Sollicitudin Bibendum Egestas
=
UllamcorperTellusSollicitudinBibendumEgestas

```

### Highlight

[](#highlight)

Converts square brackets \[\] within this string to a spans with css class.

PHP

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

Template

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

```

Input = Output

```
Ullamcorper [Tellus] Sollicitudin Bibendum Egestas
=
Ullamcorper Tellus Sollicitudin Bibendum Egestas
```

### SplitLines

[](#splitlines)

Separates this string by lines into an ArrayList.

Template

```

        {$Line}

```

Input = Output

```
Maecenas sed diam eget risus varius blandit sit amet non magna.
Etiam porta sem malesuada magna mollis euismod.
=

    Maecenas sed diam eget risus varius blandit sit amet non magna.

    Etiam porta sem malesuada magna mollis euismod.

```

### Explode

[](#explode)

Separates this string by specified the delimiter.

Template

```

        {$Value}

```

Input = Output

```
Aenean,Purus,Dolor,Magna
=
Aenean
Purus
Dolor
Magna
```

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance28

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~34 days

Total

5

Last Release

2849d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11811440?v=4)[Gorrie Coe](/maintainers/gorriecoe)[@gorriecoe](https://github.com/gorriecoe)

---

Top Contributors

[![gorriecoe](https://avatars.githubusercontent.com/u/11811440?v=4)](https://github.com/gorriecoe "gorriecoe (12 commits)")

---

Tags

stringsilverstripedbstring

### Embed Badge

![Health badge](/badges/gorriecoe-silverstripe-dbstringextras/health.svg)

```
[![Health](https://phpackages.com/badges/gorriecoe-silverstripe-dbstringextras/health.svg)](https://phpackages.com/packages/gorriecoe-silverstripe-dbstringextras)
```

###  Alternatives

[silverstripe/multi-domain

Allows multiple domains to access one CMS instance, mapping them to different sections of the hierarchy

141.6k](/packages/silverstripe-multi-domain)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
