PHP 클래스 App\Libraries\Str

상속: extends Illuminate\Support\Str
파일 보기 프로젝트 열기: sroutier/laravel-5.1-enterprise-starter-kit 1 사용 예제들

공개 메소드들

메소드 설명
head ( $value, integer $limit = 100, string $end = '...' ) : string Returns the input string shrunk to the limit size, by cutting in the end (tail).
head_and_tail ( $value, integer $limit = 100, string $mid = '...' ) : string Returns the input string shrunk to the limit size, by cutting in the middle.
isBoolean ( $str ) : boolean Evaluate the input string and returns true if it can be converted to a boolean.
isNullOrEmptyString ( $question ) : boolean Return true if the trim'ed value is unset, null or empty.
tail ( $value, integer $limit = 100, string $start = '...' ) : string Returns the input string shrunk to the limit size, by cutting in the start (head).
toBoolean ( $str ) : boolean Converts the input string to it's boolean representation.

메소드 상세

head() 공개 정적인 메소드

The start (head) of a string will be returned with an ellipsis after it where the text is cut.
public static head ( $value, integer $limit = 100, string $end = '...' ) : string
$value
$limit integer
$end string
리턴 string

head_and_tail() 공개 정적인 메소드

The start (head) and end (tail) of a string will be returned with an ellipsis between them where the text is cut.
public static head_and_tail ( $value, integer $limit = 100, string $mid = '...' ) : string
$value
$limit integer
$mid string
리턴 string

isBoolean() 공개 정적인 메소드

Evaluate the input string and returns true if it can be converted to a boolean.
public static isBoolean ( $str ) : boolean
$str
리턴 boolean

isNullOrEmptyString() 공개 정적인 메소드

Modification from: http://stackoverflow.com/a/381275 Author: Michael Haren (http://stackoverflow.com/users/29/michael-haren)
public static isNullOrEmptyString ( $question ) : boolean
$question
리턴 boolean

tail() 공개 정적인 메소드

The end (tail) of a string will be returned with an ellipsis before it where the text is cut.
public static tail ( $value, integer $limit = 100, string $start = '...' ) : string
$value
$limit integer
$start string
리턴 string

toBoolean() 공개 정적인 메소드

Converts the input string to it's boolean representation.
public static toBoolean ( $str ) : boolean
$str
리턴 boolean