LaravelStr

Summary

No protected properties found
N/A
No private methods found
No private properties found
N/A
File
str.php
Package
Default
Class hierarchy
LaravelStr

Tags

None found

Properties

$pluralizer

$pluralizer : \Laravel\Pluralizer

The pluralizer instance.

Type

LaravelPluralizer

Tags

None found

$encoding

$encoding : string

Cache application encoding locally to save expensive calls to Config::get().

Type

string

Tags

None found

Methods

length()

length(string  $value) : integer

Get the length of a string.

// Get the length of a string $length = Str::length('Taylor Otwell');

// Get the length of a multi-byte string
$length = Str::length('Τάχιστη')

Parameters

string $value

Returns

integer

static

Tags

None found

lower()

lower(string  $value) : string

Convert a string to lowercase.

// Convert a string to lowercase $lower = Str::lower('Taylor Otwell');

// Convert a multi-byte string to lowercase
$lower = Str::lower('Τάχιστη');

Parameters

string $value

Returns

string

static

Tags

None found

upper()

upper(string  $value) : string

Convert a string to uppercase.

// Convert a string to uppercase $upper = Str::upper('Taylor Otwell');

// Convert a multi-byte string to uppercase
$upper = Str::upper('Τάχιστη');

Parameters

string $value

Returns

string

static

Tags

None found

title()

title(string  $value) : string

Convert a string to title case (ucwords equivalent).

// Convert a string to title case $title = Str::title('taylor otwell');

// Convert a multi-byte string to title case
$title = Str::title('νωθÏ
						

Documentation created by phpDocumentor