Str

24 results found
Posted on November 25, 2016

Str::limit

The Str::limit function limits the number of characters in a string. The function accepts a string as its first argument and the maximum number of resulting characters as its second argument.

Read more
Posted on November 25, 2016

Str::is

The Str::is function determines if a given string matches a given pattern. Asterisks may be used to indicate wildcards.

Use the asterisk to indicate that more chars are before or after the $pattern we are searching for so you can have a match.

Read more
Posted on November 25, 2016

Str::endWith

The Str::endWith function determines if the given string ends with the given value.

As i mentioned before the second parameter can be a string or an array of strings. In case it is a string the method returns true or false accordingly by checking in a case-sensitive manner. In case we pass an array of strings then the method returns true as long as one of the strings is the correct one.

Read more