gorriecoe\DBStringExtras\DBStringExtras
Adds extra methods to strings
Synopsis
class DBStringExtras
extends DataExtension
{
- // members
- private static array $casting = ;
- // methods
- public string StrReplace()
- public string Nice()
- public void Hyphenate()
- public string RemoveSpaces()
- public DBHTMLText Highlight()
- public ArrayList|Null SplitLines()
- public ArrayList|Null Explode()
Hierarchy
Extends
- SilverStripe\ORM\DataExtension
Members
private
- $casting
—
array
Ensures that the methods are wrapped in the correct type and values are safely escaped while rendering in the template.
Methods
public
- Explode() — Separates this string by the specified delimiter.
- Highlight() — Converts square brackets [] within this string to a spans with css class.
- Hyphenate() — Converts this camel case string to a hyphenated, kebab or spinal case string.
- Nice() — Converts this camel case and hyphenated string to a space separated string.
- RemoveSpaces() — Removes spaces from this string.
- SplitLines() — Separates this string by lines into an ArrayList.
- StrReplace() — Replace all occurrences of the search string with the replacement string.