Download the PHP package majoreasy/stringhelper without Composer
On this page you can find all versions of the php package majoreasy/stringhelper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download majoreasy/stringhelper
More information about majoreasy/stringhelper
Files in majoreasy/stringhelper
Package stringhelper
Short Description you can use easy string methods
License MIT
Informations about the package stringhelper
String-Helper
You can use easy String Methods
Install
composer require majoreasy/stringhelper
Usage
require_once('vendor/autoload.php'); use \Major\Helper\StrHelper;
-
toJadenCase
echo StrHelper::setStr("hi i like tea")::toJadenCase();
// Hi I Like Tea -
Repeat
echo StrHelper::setStr("Hello my name is James")::repeat(3);
// Result : Hello my name is James Hello my name is James Hello my name is James -
Slice
echo StrHelper::setStr("Im from England")::slice(0, 3);
// Result : Im -
Length
echo StrHelper::setStr("I have brother")::length();
// Result : 14 -
toUpperCase
echo StrHelper::setStr("This is my message")::toUpperCase();
// Result : THIS IS MY MESSAGE -
toLowerCase
echo StrHelper::setStr("and I have Smart Phone")::toLowerCase();
// Result : and i have smart phone -
toASCII echo StrHelper::setStr("H")::toASCII();
// Result : 72 -
Replace
echo StrHelper::setStr("Hi my name is murat")::replace("murat", "james");
// Result : Hi my name is james -
includes
echo StrHelper::setStr("Hi im living italy")::includes("italy");
// Result :1 -
endsWith
echo StrHelper::setStr("Hi im living sweden")::endsWith("sweden");
// Result :1 - startsWith
echo StrHelper::setStr("Hi im living sweden")::startsWith("Hi");
// Result :1