AdiantiStringConversion
in package
String manipulation
Tags
Table of Contents
Methods
- assureISO() : mixed
- Assure ISO8859-1
- assureUnicode() : mixed
- Returns the string as Unicode when needed
- camelCaseFromUnderscore() : mixed
- Returns camel case string from underscore string
- getBetween() : mixed
- Replace text between
- removeAccent() : mixed
- Remove accents from string
- replaceBetween() : mixed
- Replace text between
- slug() : mixed
- Returns the slug from string
- underscoreFromCamelCase() : mixed
- Returns underscore string from camel case string
- utf8Decode() : mixed
- Polyfill for utf8_decode()
- utf8Encode() : mixed
- Polyfill for utf8_encode()
Methods
assureISO()
Assure ISO8859-1
public
static assureISO(mixed $content) : mixed
Parameters
- $content : mixed
assureUnicode()
Returns the string as Unicode when needed
public
static assureUnicode(mixed $content) : mixed
Parameters
- $content : mixed
camelCaseFromUnderscore()
Returns camel case string from underscore string
public
static camelCaseFromUnderscore(mixed $string[, mixed $spaces = FALSE ]) : mixed
Parameters
- $string : mixed
- $spaces : mixed = FALSE
getBetween()
Replace text between
public
static getBetween(mixed $str, mixed $needle_start, mixed $needle_end[, mixed $include_limits = true ]) : mixed
Parameters
- $str : mixed
-
Text to be replaced
- $needle_start : mixed
-
Start mark
- $needle_end : mixed
-
End mark
- $include_limits : mixed = true
-
if the mark limits will be replaced
removeAccent()
Remove accents from string
public
static removeAccent(mixed $str) : mixed
Parameters
- $str : mixed
replaceBetween()
Replace text between
public
static replaceBetween(mixed $str, mixed $needle_start, mixed $needle_end, mixed $replacement[, mixed $include_limits = true ]) : mixed
Parameters
- $str : mixed
-
Text to be replaced
- $needle_start : mixed
-
Start mark
- $needle_end : mixed
-
End mark
- $replacement : mixed
-
Text to be inserted
- $include_limits : mixed = true
-
if the mark limits will be replaced
slug()
Returns the slug from string
public
static slug(mixed $content[, mixed $separator = '-' ][, mixed $tolower = true ]) : mixed
Parameters
- $content : mixed
- $separator : mixed = '-'
- $tolower : mixed = true
underscoreFromCamelCase()
Returns underscore string from camel case string
public
static underscoreFromCamelCase(mixed $string[, mixed $spaces = FALSE ]) : mixed
Parameters
- $string : mixed
- $spaces : mixed = FALSE
utf8Decode()
Polyfill for utf8_decode()
public
static utf8Decode(mixed $string) : mixed
Parameters
- $string : mixed
utf8Encode()
Polyfill for utf8_encode()
public
static utf8Encode(mixed $string) : mixed
Parameters
- $string : mixed