PHP code example of fyre / string
1. Go to this page and download the library: Download fyre/string library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
fyre / string example snippets
use Fyre\Utility\Str;
$after = Str::after($string, $search);
$afterLast = Str::afterLast($string, $search);
$before = Str::before($string, $search);
$beforeLast = Str::beforeLast($string, $search);
$camel = Str::camel($string);
$capitalized = Str::capitalize($string);
$chunks = Str::chunks($string, $size);
$contains = Str::contains($string, $search);
$containsAll = Str::containsAll($string, $searches);
$containsAny = Str::containsAny($string, $searches);
$end = Str::end($string, $search);
$endsWith = Str::endsWith($string, $search);
$escaped = Str::escape($string, $flags);
$indexOf = Str::indexOf($string, $search);
$isString = Str::isString($value);
$kebab = Str::kebab($string);
$lastIndexOf = Str::lastIndexOf($string, $search);
$length = Str::length($string);
$limited = Str::limit($string, $limit, $append);
$lower = Str::lower($string);
$padded = Str::pad($string, $length, $padding);
$padded = Str::padEnd($string, $length, $padding);
$padded = Str::padStart($string, $length, $padding);
$pascal = Str::pascal($string);
$random = Str::random($length, $chars);
$repeated = Str::repeat($string, $count);
$replaced = Str::replace($string, $search, $replace);
$replaced = Str::replaceArray($string, $search, $replacements);
$replaced = Str::replaceAt($string, $replace, $position, $length);
$replaced = Str::replaceEach($string, $replacements);
$replaced = Str::replaceFirst($string, $search, $replace);
$replaced = Str::replaceLast($string, $search, $replace);
$reversed = Str::reverse($string);
$shuffled = Str::shuffle($string);
$sliced = Str::slice($string, $start, $length);
$slug = Str::slug($string, $delimiter);
$snake = Str::snake($string);
$split = Str::split($string, $delimiter, $limit);
$start = Str::start($string, $search);
$startsWith = Str::startsWith($string, $search);
$title = Str::title($string);
$transliterated = Str::transliterate($string);
$trimmed = Str::trim($string, $mask);
$trimmed = Str::trimEnd($string, $mask);
$trimmed = Str::trimStart($string, $mask);
$upper = Str::upper($string);