{"id":13623832,"url":"https://github.com/voku/Stringy","last_synced_at":"2025-04-15T20:32:30.987Z","repository":{"id":45325844,"uuid":"41980915","full_name":"voku/Stringy","owner":"voku","description":":accept: Stringy - A PHP string manipulation library with multibyte support, performance optimized","archived":false,"fork":true,"pushed_at":"2025-01-17T04:25:06.000Z","size":2404,"stargazers_count":176,"open_issues_count":6,"forks_count":21,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-12T09:35:04.928Z","etag":null,"topics":["hacktoberfest","php","php7","string-manipulation","stringify","unicode","unicode-characters"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"danielstjules/Stringy","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/voku.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":["voku"],"patreon":"voku","tidelift":"packagist/voku/stringy","custom":"https://www.paypal.me/moelleken"}},"created_at":"2015-09-06T00:46:41.000Z","updated_at":"2025-04-03T20:06:15.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/voku/Stringy","commit_stats":{"total_commits":476,"total_committers":41,"mean_commits":"11.609756097560975","dds":0.6449579831932772,"last_synced_commit":"d4a85791de4b380b2aa1e0b86e7ebdb322b551dd"},"previous_names":[],"tags_count":94,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voku%2FStringy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voku%2FStringy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voku%2FStringy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voku%2FStringy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/voku","download_url":"https://codeload.github.com/voku/Stringy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249148132,"owners_count":21220483,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","php","php7","string-manipulation","stringify","unicode","unicode-characters"],"created_at":"2024-08-01T21:01:36.152Z","updated_at":"2025-04-15T20:32:30.935Z","avatar_url":"https://github.com/voku.png","language":"PHP","funding_links":["https://github.com/sponsors/voku","https://patreon.com/voku","https://tidelift.com/funding/github/packagist/voku/stringy","https://www.paypal.me/moelleken","https://www.patreon.com/voku"],"categories":["目录","Table of Contents","PHP"],"sub_categories":["字符串 Strings","Strings"],"readme":"[//]: # (AUTO-GENERATED BY \"PHP README Helper\": base file -\u003e docs/base.md)\n[//]: # (AUTO-GENERATED BY \"PHP README Helper\": base file -\u003e docs/base.md)\n[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md)\n\n[![Build Status](https://github.com/voku/Stringy/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/voku/Stringy/actions)\n[![codecov.io](https://codecov.io/github/voku/Stringy/coverage.svg?branch=master)](https://codecov.io/github/voku/Stringy?branch=master)\n[![Codacy Badge](https://api.codacy.com/project/badge/grade/97c46467e585467d884bac1130cb45e5)](https://www.codacy.com/app/voku/Stringy)\n[![Latest Stable Version](https://poser.pugx.org/voku/stringy/v/stable)](https://packagist.org/packages/voku/stringy)\n[![Total Downloads](https://poser.pugx.org/voku/stringy/downloads)](https://packagist.org/packages/voku/stringy) \n[![License](https://poser.pugx.org/voku/stringy/license)](https://packagist.org/packages/voku/stringy)\n[![Donate to this project using Paypal](https://img.shields.io/badge/paypal-donate-yellow.svg)](https://www.paypal.me/moelleken)\n[![Donate to this project using Patreon](https://img.shields.io/badge/patreon-donate-yellow.svg)](https://www.patreon.com/voku)\n\n## :accept: Stringy \n\nA PHP string manipulation library with multibyte support. Compatible with PHP 7+\n\n100% compatible with the original \"[Stringy](https://github.com/danielstjules/Stringy)\" library, but this fork is optimized \nfor performance and is using PHP 7+ features. \n\n``` php\ns('string')-\u003etoTitleCase()-\u003eensureRight('y') == 'Stringy'\n```\n\n* [Why?](#why)\n* [Alternative](#alternative)\n* [Installation](#installation-via-composer-require)\n* [OO and Chaining](#oo-and-chaining)\n* [Implemented Interfaces](#implemented-interfaces)\n* [PHP Class Call Creation](#php-class-call-creation)\n* [Class methods](#class-methods)\n    * [create](#createmixed-str--encoding-)\n* [Instance methods](#instance-methods)\n* [Extensions](#extensions)\n* [Tests](#tests)\n* [License](#license)\n\n## Why?\n\nIn part due to a lack of multibyte support (including UTF-8) across many of\nPHP's standard string functions. But also to offer an OO wrapper around the\n`mbstring` module's multibyte-compatible functions. Stringy handles some quirks,\nprovides additional functionality, and hopefully makes strings a little easier\nto work with!\n\n```php\n// Standard library\nstrtoupper('fòôbàř');       // 'FòôBàř'\nstrlen('fòôbàř');           // 10\n\n// mbstring\nmb_strtoupper('fòôbàř');    // 'FÒÔBÀŘ'\nmb_strlen('fòôbàř');        // '6'\n\n// Stringy\n$stringy = Stringy\\Stringy::create('fòôbàř');\n$stringy-\u003etoUpperCase();    // 'FÒÔBÀŘ'\n$stringy-\u003elength();         // '6'\n```\n\n## Alternative\n\nIf you like a more Functional Way to edit strings, then you can take a look at [voku/portable-utf8](https://github.com/voku/portable-utf8), also \"voku/Stringy\" used the functions from the \"Portable UTF-8\"-Class but in a more Object Oriented Way.\n\n```php\n// Portable UTF-8\nuse voku\\helper\\UTF8;\nUTF8::strtoupper('fòôbàř');    // 'FÒÔBÀŘ'\nUTF8::strlen('fòôbàř');        // '6'\n```\n\n## Installation via \"composer require\"\n```shell\ncomposer require voku/stringy\n```\n\n## Installation via composer (manually)\n\nIf you're using Composer to manage dependencies, you can include the following\nin your composer.json file:\n\n```json\n\"require\": {\n    \"voku/stringy\": \"~6.0\"\n}\n```\n\nThen, after running `composer update` or `php composer.phar update`, you can\nload the class using Composer's autoloading:\n\n```php\nrequire 'vendor/autoload.php';\n```\n\nOtherwise, you can simply require the file directly:\n\n```php\nrequire_once 'path/to/Stringy/src/Stringy.php';\n```\n\nAnd in either case, I'd suggest using an alias.\n\n```php\nuse Stringy\\Stringy as S;\n```\n\n## OO and Chaining\n\nThe library offers OO method chaining, as seen below:\n\n```php\nuse Stringy\\Stringy as S;\necho S::create('fòô     bàř')-\u003ecollapseWhitespace()-\u003eswapCase(); // 'FÒÔ BÀŘ'\n```\n\n`Stringy\\Stringy` has a __toString() method, which returns the current string\nwhen the object is used in a string context, ie:\n`(string) S::create('foo')  // 'foo'`\n\n## Implemented Interfaces\n\n`Stringy\\Stringy` implements the `IteratorAggregate` interface, meaning that\n`foreach` can be used with an instance of the class:\n\n``` php\n$stringy = S::create('fòôbàř');\nforeach ($stringy as $char) {\n    echo $char;\n}\n// 'fòôbàř'\n```\n\nIt implements the `Countable` interface, enabling the use of `count()` to\nretrieve the number of characters in the string:\n\n``` php\n$stringy = S::create('fòô');\ncount($stringy);  // 3\n```\n\nFurthermore, the `ArrayAccess` interface has been implemented. As a result,\n`isset()` can be used to check if a character at a specific index exists. And\nsince `Stringy\\Stringy` is immutable, any call to `offsetSet` or `offsetUnset`\nwill throw an exception. `offsetGet` has been implemented, however, and accepts\nboth positive and negative indexes. Invalid indexes result in an\n`OutOfBoundsException`.\n\n``` php\n$stringy = S::create('bàř');\necho $stringy[2];     // 'ř'\necho $stringy[-2];    // 'à'\nisset($stringy[-4]);  // false\n\n$stringy[3];          // OutOfBoundsException\n$stringy[2] = 'a';    // Exception\n```\n\n## PHP Class Call Creation\n\nAs of PHP 5.6+, [`use function`](https://wiki.php.net/rfc/use_function) is\navailable for importing functions. Stringy exposes a namespaced function,\n`Stringy\\create`, which emits the same behaviour as `Stringy\\Stringy::create()`.\n\n``` php\nuse function Stringy\\create as s;\n\n// Instead of: S::create('fòô     bàř')\ns('fòô     bàř')-\u003ecollapseWhitespace()-\u003eswapCase();\n```\n\n## Class methods\n\n##### create(mixed $str [, $encoding ])\n\nCreates a Stringy object and assigns both str and encoding properties\nthe supplied values. $str is cast to a string prior to assignment, and if\n$encoding is not specified, it defaults to mb_internal_encoding(). It\nthen returns the initialized object. Throws an InvalidArgumentException\nif the first argument is an array or object without a __toString method.\n\n```php\n$stringy = S::create('fòôbàř', 'UTF-8'); // 'fòôbàř'\n```\n\nIf you need a collection of Stringy objects you can use the S::collection()\nmethod. \n\n```php\n$stringyCollection = \\Stringy\\collection(['fòôbàř', 'lall', 'öäü']);\n```\n\n## Instance Methods\n\nStringy objects are immutable. All examples below make use of PHP 5.6\nfunction importing, and PHP 5.4 short array syntax. They also assume the\nencoding returned by mb_internal_encoding() is UTF-8. For further details,\nsee the documentation for the create method above.\n\n\u003cp id=\"voku-php-readme-class-methods\"\u003e\u003c/p\u003e\u003ctable\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#afterstring-string-static\"\u003eafter\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#afterfirststring-separator-static\"\u003eafterFirst\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#afterfirstignorecasestring-separator-static\"\u003eafterFirstIgnoreCase\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#afterlaststring-separator-static\"\u003eafterLast\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#afterlastignorecasestring-separator-static\"\u003eafterLastIgnoreCase\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#appendstring-suffix-static\"\u003eappend\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#appendpasswordint-length-static\"\u003eappendPassword\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#appendrandomstringint-length-string-possiblechars-static\"\u003eappendRandomString\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#appendstringycollectionstringystatic-suffix-static\"\u003eappendStringy\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#appenduniqueidentifierintstring-entropyextra-bool-md5-static\"\u003eappendUniqueIdentifier\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#atint-index-static\"\u003eat\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#base64decode-self\"\u003ebase64Decode\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#base64encode-self\"\u003ebase64Encode\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#bcryptintstring-options-static\"\u003ebcrypt\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#beforestring-string-static\"\u003ebefore\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#beforefirststring-separator-static\"\u003ebeforeFirst\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#beforefirstignorecasestring-separator-static\"\u003ebeforeFirstIgnoreCase\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#beforelaststring-separator-static\"\u003ebeforeLast\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#beforelastignorecasestring-separator-static\"\u003ebeforeLastIgnoreCase\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#betweenstring-start-string-end-int-offset-static\"\u003ebetween\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#calluserfunctioncallable-function-mixed-parameter-static\"\u003ecallUserFunction\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#camelize-static\"\u003ecamelize\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#capitalizepersonalname-static\"\u003ecapitalizePersonalName\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#chars-string\"\u003echars\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#chunkint-length-static\"\u003echunk\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#chunkcollectionint-length-collectionstringystatic\"\u003echunkCollection\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#collapsewhitespace-static\"\u003ecollapseWhitespace\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#containsstring-needle-bool-casesensitive-bool\"\u003econtains\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#containsallstring-needles-bool-casesensitive-bool\"\u003econtainsAll\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#containsanystring-needles-bool-casesensitive-bool\"\u003econtainsAny\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#containsbom-bool\"\u003econtainsBom\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#count-int\"\u003ecount\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#countsubstrstring-substring-bool-casesensitive-int\"\u003ecountSubstr\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#crc32-int\"\u003ecrc32\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#createmixed-str-string-encoding-static\"\u003ecreate\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#cryptstring-salt-static\"\u003ecrypt\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#dasherize-static\"\u003edasherize\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#decryptstring-password-static\"\u003edecrypt\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#delimitstring-delimiter-static\"\u003edelimit\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#encodestring-new_encoding-bool-auto_detect_encoding-static\"\u003eencode\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#encryptstring-password-static\"\u003eencrypt\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#endswithstring-substring-bool-casesensitive-bool\"\u003eendsWith\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#endswithanystring-substrings-bool-casesensitive-bool\"\u003eendsWithAny\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#ensureleftstring-substring-static\"\u003eensureLeft\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#ensurerightstring-substring-static\"\u003eensureRight\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#escape-static\"\u003eescape\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#explodestring-delimiter-int-limit-arrayintstatic\"\u003eexplode\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#explodecollectionstring-delimiter-int-limit-collectionstringystatic\"\u003eexplodeCollection\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#extractintegers-static\"\u003eextractIntegers\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#extractspecialcharacters-static\"\u003eextractSpecialCharacters\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#extracttextstring-search-intnull-length-string-replacerforskippedtext-static\"\u003eextractText\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#firstint-n-static\"\u003efirst\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#formatmixed-args-static\"\u003eformat\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#getencoding-string\"\u003egetEncoding\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#getiterator-arrayiterator\"\u003egetIterator\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#hardwrapint-width-string-break-static\"\u003ehardWrap\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#haslowercase-bool\"\u003ehasLowerCase\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#hasuppercase-bool\"\u003ehasUpperCase\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#hashstring-algorithm-static\"\u003ehash\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#hexdecode-static\"\u003ehexDecode\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#hexencode-static\"\u003ehexEncode\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#htmldecodeint-flags-static\"\u003ehtmlDecode\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#htmlencodeint-flags-static\"\u003ehtmlEncode\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#humanize-static\"\u003ehumanize\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#instring-str-bool-casesensitive-bool\"\u003ein\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#indexofstring-needle-int-offset-falseint\"\u003eindexOf\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#indexofignorecasestring-needle-int-offset-falseint\"\u003eindexOfIgnoreCase\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#indexoflaststring-needle-int-offset-falseint\"\u003eindexOfLast\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#indexoflastignorecasestring-needle-int-offset-falseint\"\u003eindexOfLastIgnoreCase\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#insertstring-substring-int-index-static\"\u003einsert\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#isstring-pattern-bool\"\u003eis\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#isalpha-bool\"\u003eisAlpha\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#isalphanumeric-bool\"\u003eisAlphanumeric\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#isascii-bool\"\u003eisAscii\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#isbase64bool-emptystringisvalid-bool\"\u003eisBase64\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#isbinary-bool\"\u003eisBinary\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#isblank-bool\"\u003eisBlank\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#isbom-bool\"\u003eisBom\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#isemailbool-useexampledomaincheck-bool-usetypoindomaincheck-bool-usetemporarydomaincheck-bool-usednscheck-bool\"\u003eisEmail\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#isempty-bool\"\u003eisEmpty\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#isequalsstringstringy-str-bool\"\u003eisEquals\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#isequalscaseinsensitivefloatintstringstringy-str-bool\"\u003eisEqualsCaseInsensitive\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#isequalscasesensitivefloatintstringstringy-str-bool\"\u003eisEqualsCaseSensitive\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#ishexadecimal-bool\"\u003eisHexadecimal\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#ishtml-bool\"\u003eisHtml\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#isjsonbool-onlyarrayorobjectresultsarevalid-bool\"\u003eisJson\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#islowercase-bool\"\u003eisLowerCase\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#isnotempty-bool\"\u003eisNotEmpty\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#isnumeric-bool\"\u003eisNumeric\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#isprintable-bool\"\u003eisPrintable\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#ispunctuation-bool\"\u003eisPunctuation\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#isserialized-bool\"\u003eisSerialized\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#issimilarstring-str-float-minpercentforsimilarity-bool\"\u003eisSimilar\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#isuppercase-bool\"\u003eisUpperCase\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#isurlbool-disallow_localhost-bool\"\u003eisUrl\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#isutf8bool-strict-bool\"\u003eisUtf8\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#isutf16-falseint\"\u003eisUtf16\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#isutf32-falseint\"\u003eisUtf32\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#iswhitespace-bool\"\u003eisWhitespace\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#jsonserialize-string\"\u003ejsonSerialize\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#kebabcase-static\"\u003ekebabCase\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#lastint-n-static\"\u003elast\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#lastsubstringofstring-needle-bool-beforeneedle-static\"\u003elastSubstringOf\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#lastsubstringofignorecasestring-needle-bool-beforeneedle-static\"\u003elastSubstringOfIgnoreCase\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#length-int\"\u003elength\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#linewrapint-limit-string-break-bool-add_final_break-stringnull-delimiter-static\"\u003elineWrap\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#linewrapafterwordint-limit-string-break-bool-add_final_break-stringnull-delimiter-static\"\u003elineWrapAfterWord\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#lines-static\"\u003elines\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#linescollection-collectionstringystatic\"\u003elinesCollection\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#longestcommonprefixstring-otherstr-static\"\u003elongestCommonPrefix\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#longestcommonsubstringstring-otherstr-static\"\u003elongestCommonSubstring\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#longestcommonsuffixstring-otherstr-static\"\u003elongestCommonSuffix\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#lowercasefirst-static\"\u003elowerCaseFirst\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#matchcaseinsensitivestringstringy-str-bool\"\u003ematchCaseInsensitive\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#matchcasesensitivestringstringy-str-bool\"\u003ematchCaseSensitive\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#md5-static\"\u003emd5\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#newlinetohtmlbreak-static\"\u003enewLineToHtmlBreak\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#nthint-step-int-offset-static\"\u003enth\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#offsetexistsint-offset-bool\"\u003eoffsetExists\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#offsetgetint-offset-string\"\u003eoffsetGet\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#offsetsetint-offset-mixed-value-void\"\u003eoffsetSet\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#offsetunsetint-offset-void\"\u003eoffsetUnset\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#padint-length-string-padstr-string-padtype-static\"\u003epad\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#padbothint-length-string-padstr-static\"\u003epadBoth\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#padleftint-length-string-padstr-static\"\u003epadLeft\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#padrightint-length-string-padstr-static\"\u003epadRight\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#pascalcase-static\"\u003epascalCase\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#prependstring-prefix-static\"\u003eprepend\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#prependstringycollectionstringystatic-prefix-static\"\u003eprependStringy\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#regexreplacestring-pattern-string-replacement-string-options-string-delimiter-static\"\u003eregexReplace\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#removehtmlstring-allowabletags-static\"\u003eremoveHtml\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#removehtmlbreakstring-replacement-static\"\u003eremoveHtmlBreak\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#removeleftstring-substring-static\"\u003eremoveLeft\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#removerightstring-substring-static\"\u003eremoveRight\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#removexss-static\"\u003eremoveXss\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#repeatint-multiplier-static\"\u003erepeat\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#replacestring-search-string-replacement-bool-casesensitive-static\"\u003ereplace\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#replaceallstring-search-stringstring-replacement-bool-casesensitive-static\"\u003ereplaceAll\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#replacebeginningstring-search-string-replacement-static\"\u003ereplaceBeginning\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#replaceendingstring-search-string-replacement-static\"\u003ereplaceEnding\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#replacefirststring-search-string-replacement-static\"\u003ereplaceFirst\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#replacelaststring-search-string-replacement-static\"\u003ereplaceLast\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#reverse-static\"\u003ereverse\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#safetruncateint-length-string-substring-bool-ignoredonotsplitwordsforoneword-static\"\u003esafeTruncate\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#setinternalencodingstring-new_encoding-static\"\u003esetInternalEncoding\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#sha1-static\"\u003esha1\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#sha256-static\"\u003esha256\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#sha512-static\"\u003esha512\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#shortenafterwordint-length-string-straddon-static\"\u003eshortenAfterWord\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#shuffle-static\"\u003eshuffle\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#similaritystring-str-float\"\u003esimilarity\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#sliceint-start-int-end-static\"\u003eslice\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#slugifystring-separator-string-language-string-replacements-bool-replace_extra_symbols-bool-use_str_to_lower-bool-use_transliterate-static\"\u003eslugify\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#snakecase-static\"\u003esnakeCase\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#snakeize-static\"\u003esnakeize\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#softwrapint-width-string-break-static\"\u003esoftWrap\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#splitstring-pattern-int-limit-static\"\u003esplit\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#splitcollectionstring-pattern-int-limit-collectionstringystatic\"\u003esplitCollection\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#startswithstring-substring-bool-casesensitive-bool\"\u003estartsWith\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#startswithanystring-substrings-bool-casesensitive-bool\"\u003estartsWithAny\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#stripstringstring-search-static\"\u003estrip\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#stripwhitespace-static\"\u003estripWhitespace\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#stripecssmediaqueries-static\"\u003estripeCssMediaQueries\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#stripeemptyhtmltags-static\"\u003estripeEmptyHtmlTags\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#studlycase-static\"\u003estudlyCase\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#substrint-start-int-length-static\"\u003esubstr\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#substringint-start-int-length-static\"\u003esubstring\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#substringofstring-needle-bool-beforeneedle-static\"\u003esubstringOf\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#substringofignorecasestring-needle-bool-beforeneedle-static\"\u003esubstringOfIgnoreCase\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#surroundstring-substring-static\"\u003esurround\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#swapcase-static\"\u003eswapCase\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#tidy-static\"\u003etidy\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#titleizestringnull-ignore-stringnull-word_define_chars-stringnull-language-static\"\u003etitleize\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#titleizeforhumansstring-ignore-static\"\u003etitleizeForHumans\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#toasciistring-language-bool-removeunsupported-static\"\u003etoAscii\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#toboolean-bool\"\u003etoBoolean\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#tolowercasebool-trytokeepstringlength-stringnull-lang-static\"\u003etoLowerCase\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#tospacesint-tablength-static\"\u003etoSpaces\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#tostring-string\"\u003etoString\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#totabsint-tablength-static\"\u003etoTabs\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#totitlecase-static\"\u003etoTitleCase\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#totransliteratebool-strict-string-unknown-static\"\u003etoTransliterate\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#touppercasebool-trytokeepstringlength-stringnull-lang-static\"\u003etoUpperCase\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#trimstring-chars-static\"\u003etrim\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#trimleftstring-chars-static\"\u003etrimLeft\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#trimrightstring-chars-static\"\u003etrimRight\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#truncateint-length-string-substring-static\"\u003etruncate\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#underscored-static\"\u003eunderscored\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#uppercamelize-static\"\u003eupperCamelize\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#uppercasefirst-static\"\u003eupperCaseFirst\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#urldecode-static\"\u003eurlDecode\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#urldecodemulti-static\"\u003eurlDecodeMulti\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#urldecoderaw-static\"\u003eurlDecodeRaw\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#urldecoderawmulti-static\"\u003eurlDecodeRawMulti\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#urlencode-static\"\u003eurlEncode\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#urlencoderaw-static\"\u003eurlEncodeRaw\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#urlifystring-separator-string-language-string-replacements-bool-strtolower-static\"\u003eurlify\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#utf8ify-static\"\u003eutf8ify\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#wordsstring-char_list-bool-remove_empty_values-intnull-remove_short_values-static\"\u003ewords\u003c/a\u003e\n\u003c/td\u003e\u003ctd\u003e\u003ca href=\"#wordscollectionstring-char_list-bool-remove_empty_values-intnull-remove_short_values-collectionstringystatic\"\u003ewordsCollection\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ca href=\"#wrapstring-substring-static\"\u003ewrap\u003c/a\u003e\n\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\n\n## after(string $string): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturn part of the string occurring after a specific string.\n\nEXAMPLE: \u003ccode\u003e\ns('宮本 茂')-\u003eafter('本'); // ' 茂'\n\u003c/code\u003e\n\n**Parameters:**\n- `string $string \u003cp\u003eThe delimiting string.\u003c/p\u003e`\n\n**Return:**\n- `static`\n\n--------\n\n## afterFirst(string $separator): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nGets the substring after the first occurrence of a separator.\n\nIf no match is found returns new empty Stringy object.\n\nEXAMPLE: \u003ccode\u003e\ns('\u003c/b\u003e\u003c/b\u003e')-\u003eafterFirst('b'); // '\u003e\u003c/b\u003e'\n\u003c/code\u003e\n\n**Parameters:**\n- `string $separator`\n\n**Return:**\n- `static`\n\n--------\n\n## afterFirstIgnoreCase(string $separator): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nGets the substring after the first occurrence of a separator.\n\nIf no match is found returns new empty Stringy object.\n\nEXAMPLE: \u003ccode\u003e\ns('\u003c/B\u003e\u003c/B\u003e')-\u003eafterFirstIgnoreCase('b'); // '\u003e\u003c/B\u003e'\n\u003c/code\u003e\n\n**Parameters:**\n- `string $separator`\n\n**Return:**\n- `static`\n\n--------\n\n## afterLast(string $separator): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nGets the substring after the last occurrence of a separator.\n\nIf no match is found returns new empty Stringy object.\n\nEXAMPLE: \u003ccode\u003e\ns('\u003c/b\u003e\u003c/b\u003e')-\u003eafterLast('b'); // '\u003e'\n\u003c/code\u003e\n\n**Parameters:**\n- `string $separator`\n\n**Return:**\n- `static`\n\n--------\n\n## afterLastIgnoreCase(string $separator): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nGets the substring after the last occurrence of a separator.\n\nIf no match is found returns new empty Stringy object.\n\nEXAMPLE: \u003ccode\u003e\ns('\u003c/B\u003e\u003c/B\u003e')-\u003eafterLastIgnoreCase('b'); // '\u003e'\n\u003c/code\u003e\n\n**Parameters:**\n- `string $separator`\n\n**Return:**\n- `static`\n\n--------\n\n## append(string $suffix): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns a new string with $suffix appended.\n\nEXAMPLE: \u003ccode\u003e\ns('fòô')-\u003eappend('bàř'); // 'fòôbàř'\n\u003c/code\u003e\n\n**Parameters:**\n- `string ...$suffix \u003cp\u003eThe string to append.\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eObject with appended $suffix.\u003c/p\u003e`\n\n--------\n\n## appendPassword(int $length): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nAppend an password (limited to chars that are good readable).\n\nEXAMPLE: \u003ccode\u003e\ns('')-\u003eappendPassword(8); // e.g.: '89bcdfgh'\n\u003c/code\u003e\n\n**Parameters:**\n- `int $length \u003cp\u003eLength of the random string.\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eObject with appended password.\u003c/p\u003e`\n\n--------\n\n## appendRandomString(int $length, string $possibleChars): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nAppend an random string.\n\nEXAMPLE: \u003ccode\u003e\ns('')-\u003eappendUniqueIdentifier(5, 'ABCDEFGHI'); // e.g.: 'CDEHI'\n\u003c/code\u003e\n\n**Parameters:**\n- `int $length \u003cp\u003eLength of the random string.\u003c/p\u003e`\n- `string $possibleChars [optional] \u003cp\u003eCharacters string for the random selection.\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eObject with appended random string.\u003c/p\u003e`\n\n--------\n\n## appendStringy(\\CollectionStringy|static $suffix): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns a new string with $suffix appended.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n- `CollectionStringy\u003cint, static\u003e|static ...$suffix \u003cp\u003eThe Stringy objects to append.\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eObject with appended $suffix.\u003c/p\u003e`\n\n--------\n\n## appendUniqueIdentifier(int|string $entropyExtra, bool $md5): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nAppend an unique identifier.\n\nEXAMPLE: \u003ccode\u003e\ns('')-\u003eappendUniqueIdentifier(); // e.g.: '1f3870be274f6c49b3e31a0c6728957f'\n\u003c/code\u003e\n\n**Parameters:**\n- `int|string $entropyExtra [optional] \u003cp\u003eExtra entropy via a string or int value.\u003c/p\u003e`\n- `bool $md5 [optional] \u003cp\u003eReturn the unique identifier as md5-hash? Default: true\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eObject with appended unique identifier as md5-hash.\u003c/p\u003e`\n\n--------\n\n## at(int $index): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns the character at $index, with indexes starting at 0.\n\nEXAMPLE: \u003ccode\u003e\ns('fòôbàř')-\u003eat(3); // 'b'\n\u003c/code\u003e\n\n**Parameters:**\n- `int $index \u003cp\u003ePosition of the character.\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eThe character at $index.\u003c/p\u003e`\n\n--------\n\n## base64Decode(): self\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nDecode the base64 encoded string.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `self`\n\n--------\n\n## base64Encode(): self\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nEncode the string to base64.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `self`\n\n--------\n\n## bcrypt(int[]|string[] $options): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nCreates a hash from the string using the CRYPT_BLOWFISH algorithm.\n\nWARNING: Using this algorithm, will result in the ```$this-\u003estr```\n         being truncated to a maximum length of 72 characters.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n- `array\u003carray-key, (int|string)\u003e $options [optional] \u003cp\u003eAn array of bcrypt hasing options.\u003c/p\u003e`\n\n**Return:**\n- `static`\n\n--------\n\n## before(string $string): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturn part of the string occurring before a specific string.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n- `string $string \u003cp\u003eThe delimiting string.\u003c/p\u003e`\n\n**Return:**\n- `static`\n\n--------\n\n## beforeFirst(string $separator): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nGets the substring before the first occurrence of a separator.\n\nIf no match is found returns new empty Stringy object.\n\nEXAMPLE: \u003ccode\u003e\ns('\u003c/b\u003e\u003c/b\u003e')-\u003ebeforeFirst('b'); // '\u003c/'\n\u003c/code\u003e\n\n**Parameters:**\n- `string $separator`\n\n**Return:**\n- `static`\n\n--------\n\n## beforeFirstIgnoreCase(string $separator): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nGets the substring before the first occurrence of a separator.\n\nIf no match is found returns new empty Stringy object.\n\nEXAMPLE: \u003ccode\u003e\ns('\u003c/B\u003e\u003c/B\u003e')-\u003ebeforeFirstIgnoreCase('b'); // '\u003c/'\n\u003c/code\u003e\n\n**Parameters:**\n- `string $separator`\n\n**Return:**\n- `static`\n\n--------\n\n## beforeLast(string $separator): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nGets the substring before the last occurrence of a separator.\n\nIf no match is found returns new empty Stringy object.\n\nEXAMPLE: \u003ccode\u003e\ns('\u003c/b\u003e\u003c/b\u003e')-\u003ebeforeLast('b'); // '\u003c/b\u003e\u003c/'\n\u003c/code\u003e\n\n**Parameters:**\n- `string $separator`\n\n**Return:**\n- `static`\n\n--------\n\n## beforeLastIgnoreCase(string $separator): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nGets the substring before the last occurrence of a separator.\n\nIf no match is found returns new empty Stringy object.\n\nEXAMPLE: \u003ccode\u003e\ns('\u003c/B\u003e\u003c/B\u003e')-\u003ebeforeLastIgnoreCase('b'); // '\u003c/B\u003e\u003c/'\n\u003c/code\u003e\n\n**Parameters:**\n- `string $separator`\n\n**Return:**\n- `static`\n\n--------\n\n## between(string $start, string $end, int $offset): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns the substring between $start and $end, if found, or an empty\nstring. An optional offset may be supplied from which to begin the\nsearch for the start string.\n\nEXAMPLE: \u003ccode\u003e\ns('{foo} and {bar}')-\u003ebetween('{', '}'); // 'foo'\n\u003c/code\u003e\n\n**Parameters:**\n- `string $start \u003cp\u003eDelimiter marking the start of the substring.\u003c/p\u003e`\n- `string $end \u003cp\u003eDelimiter marking the end of the substring.\u003c/p\u003e`\n- `int $offset [optional] \u003cp\u003eIndex from which to begin the search. Default: 0\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eObject whose $str is a substring between $start and $end.\u003c/p\u003e`\n\n--------\n\n## callUserFunction(callable $function, mixed $parameter): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nCall a user function.\n\nEXAMPLE: \u003ccode\u003e\nS::create('foo bar lall')-\u003ecallUserFunction(static function ($str) {\n    return UTF8::str_limit($str, 8);\n})-\u003etoString(); // \"foo bar…\"\n\u003c/code\u003e\n\n**Parameters:**\n- `callable $function`\n- `mixed ...$parameter`\n\n**Return:**\n- `static \u003cp\u003eObject having a $str changed via $function.\u003c/p\u003e`\n\n--------\n\n## camelize(): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns a camelCase version of the string. Trims surrounding spaces,\ncapitalizes letters following digits, spaces, dashes and underscores,\nand removes spaces, dashes, as well as underscores.\n\nEXAMPLE: \u003ccode\u003e\ns('Camel-Case')-\u003ecamelize(); // 'camelCase'\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `static \u003cp\u003eObject with $str in camelCase.\u003c/p\u003e`\n\n--------\n\n## capitalizePersonalName(): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns the string with the first letter of each word capitalized,\nexcept for when the word is a name which shouldn't be capitalized.\n\nEXAMPLE: \u003ccode\u003e\ns('jaap de hoop scheffer')-\u003ecapitalizePersonName(); // 'Jaap de Hoop Scheffer'\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `static \u003cp\u003eObject with $str capitalized.\u003c/p\u003e`\n\n--------\n\n## chars(): string[]\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns an array consisting of the characters in the string.\n\nEXAMPLE: \u003ccode\u003e\ns('fòôbàř')-\u003echars(); // ['f', 'ò', 'ô', 'b', 'à', 'ř']\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `string[] \u003cp\u003eAn array of string chars.\u003c/p\u003e`\n\n--------\n\n## chunk(int $length): static[]\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nSplits the string into chunks of Stringy objects.\n\nEXAMPLE: \u003ccode\u003e\ns('foobar')-\u003echunk(3); // ['foo', 'bar']\n\u003c/code\u003e\n\n**Parameters:**\n- `int $length [optional] \u003cp\u003eMax character length of each array element.\u003c/p\u003e`\n\n**Return:**\n- `static[] \u003cp\u003eAn array of Stringy objects.\u003c/p\u003e`\n\n--------\n\n## chunkCollection(int $length): CollectionStringy|static[]\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nSplits the string into chunks of Stringy objects collection.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n- `int $length [optional] \u003cp\u003eMax character length of each array element.\u003c/p\u003e`\n\n**Return:**\n- `\\CollectionStringy|static[] \u003cp\u003eAn collection of Stringy objects.\u003c/p\u003e`\n\n--------\n\n## collapseWhitespace(): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nTrims the string and replaces consecutive whitespace characters with a\nsingle space. This includes tabs and newline characters, as well as\nmultibyte whitespace such as the thin space and ideographic space.\n\nEXAMPLE: \u003ccode\u003e\ns('   Ο     συγγραφέας  ')-\u003ecollapseWhitespace(); // 'Ο συγγραφέας'\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `static \u003cp\u003eObject with a trimmed $str and condensed whitespace.\u003c/p\u003e`\n\n--------\n\n## contains(string $needle, bool $caseSensitive): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns true if the string contains $needle, false otherwise. By default\nthe comparison is case-sensitive, but can be made insensitive by setting\n$caseSensitive to false.\n\nEXAMPLE: \u003ccode\u003e\ns('Ο συγγραφέας είπε')-\u003econtains('συγγραφέας'); // true\n\u003c/code\u003e\n\n**Parameters:**\n- `string $needle \u003cp\u003eSubstring to look for.\u003c/p\u003e`\n- `bool $caseSensitive [optional] \u003cp\u003eWhether or not to enforce case-sensitivity. Default: true\u003c/p\u003e`\n\n**Return:**\n- `bool \u003cp\u003eWhether or not $str contains $needle.\u003c/p\u003e`\n\n--------\n\n## containsAll(string[] $needles, bool $caseSensitive): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns true if the string contains all $needles, false otherwise. By\ndefault the comparison is case-sensitive, but can be made insensitive by\nsetting $caseSensitive to false.\n\nEXAMPLE: \u003ccode\u003e\ns('foo \u0026 bar')-\u003econtainsAll(['foo', 'bar']); // true\n\u003c/code\u003e\n\n**Parameters:**\n- `string[] $needles \u003cp\u003eSubStrings to look for.\u003c/p\u003e`\n- `bool $caseSensitive [optional] \u003cp\u003eWhether or not to enforce case-sensitivity. Default: true\u003c/p\u003e`\n\n**Return:**\n- `bool \u003cp\u003eWhether or not $str contains $needle.\u003c/p\u003e`\n\n--------\n\n## containsAny(string[] $needles, bool $caseSensitive): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns true if the string contains any $needles, false otherwise. By\ndefault the comparison is case-sensitive, but can be made insensitive by\nsetting $caseSensitive to false.\n\nEXAMPLE: \u003ccode\u003e\ns('str contains foo')-\u003econtainsAny(['foo', 'bar']); // true\n\u003c/code\u003e\n\n**Parameters:**\n- `string[] $needles \u003cp\u003eSubStrings to look for.\u003c/p\u003e`\n- `bool $caseSensitive [optional] \u003cp\u003eWhether or not to enforce case-sensitivity. Default: true\u003c/p\u003e`\n\n**Return:**\n- `bool \u003cp\u003eWhether or not $str contains $needle.\u003c/p\u003e`\n\n--------\n\n## containsBom(): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nChecks if string starts with \"BOM\" (Byte Order Mark Character) character.\n\nEXAMPLE: \u003ccode\u003es(\"\\xef\\xbb\\xbf foobar\")-\u003econtainsBom(); // true\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `bool \u003cstrong\u003etrue\u003c/strong\u003e if the string has BOM at the start,\u003cbr\u003e\n\u003cstrong\u003efalse\u003c/strong\u003e otherwise`\n\n--------\n\n## count(): int\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns the length of the string, implementing the countable interface.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `int \u003cp\u003eThe number of characters in the string, given the encoding.\u003c/p\u003e`\n\n--------\n\n## countSubstr(string $substring, bool $caseSensitive): int\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns the number of occurrences of $substring in the given string.\n\nBy default, the comparison is case-sensitive, but can be made insensitive\nby setting $caseSensitive to false.\n\nEXAMPLE: \u003ccode\u003e\ns('Ο συγγραφέας είπε')-\u003ecountSubstr('α'); // 2\n\u003c/code\u003e\n\n**Parameters:**\n- `string $substring \u003cp\u003eThe substring to search for.\u003c/p\u003e`\n- `bool $caseSensitive [optional] \u003cp\u003eWhether or not to enforce case-sensitivity. Default: true\u003c/p\u003e`\n\n**Return:**\n- `int`\n\n--------\n\n## crc32(): int\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nCalculates the crc32 polynomial of a string.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `int`\n\n--------\n\n## create(mixed $str, string $encoding): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nCreates a Stringy object and assigns both str and encoding properties\nthe supplied values. $str is cast to a string prior to assignment, and if\n$encoding is not specified, it defaults to mb_internal_encoding(). It\nthen returns the initialized object. Throws an InvalidArgumentException\nif the first argument is an array or object without a __toString method.\n\n**Parameters:**\n- `mixed $str [optional] \u003cp\u003eValue to modify, after being cast to string. Default: ''\u003c/p\u003e`\n- `string $encoding [optional] \u003cp\u003eThe character encoding. Fallback: 'UTF-8'\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eA Stringy object.\u003c/p\u003e`\n\n--------\n\n## crypt(string $salt): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nOne-way string encryption (hashing).\n\nHash the string using the standard Unix DES-based algorithm or an\nalternative algorithm that may be available on the system.\n\nPS: if you need encrypt / decrypt, please use ```static::encrypt($password)```\n    and ```static::decrypt($password)```\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n- `string $salt \u003cp\u003eA salt string to base the hashing on.\u003c/p\u003e`\n\n**Return:**\n- `static`\n\n--------\n\n## dasherize(): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns a lowercase and trimmed string separated by dashes. Dashes are\ninserted before uppercase characters (with the exception of the first\ncharacter of the string), and in place of spaces as well as underscores.\n\nEXAMPLE: \u003ccode\u003e\ns('fooBar')-\u003edasherize(); // 'foo-bar'\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `static \u003cp\u003eObject with a dasherized $str\u003c/p\u003e`\n\n--------\n\n## decrypt(string $password): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nDecrypt the string.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n- `string $password The key for decrypting`\n\n**Return:**\n- `static`\n\n--------\n\n## delimit(string $delimiter): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns a lowercase and trimmed string separated by the given delimiter.\n\nDelimiters are inserted before uppercase characters (with the exception\nof the first character of the string), and in place of spaces, dashes,\nand underscores. Alpha delimiters are not converted to lowercase.\n\nEXAMPLE: \u003ccode\u003e\ns('fooBar')-\u003edelimit('::'); // 'foo::bar'\n\u003c/code\u003e\n\n**Parameters:**\n- `string $delimiter \u003cp\u003eSequence used to separate parts of the string.\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eObject with a delimited $str.\u003c/p\u003e`\n\n--------\n\n## encode(string $new_encoding, bool $auto_detect_encoding): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nEncode the given string into the given $encoding + set the internal character encoding.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n- `string $new_encoding \u003cp\u003eThe desired character encoding.\u003c/p\u003e`\n- `bool $auto_detect_encoding [optional] \u003cp\u003eAuto-detect the current string-encoding\u003c/p\u003e`\n\n**Return:**\n- `static`\n\n--------\n\n## encrypt(string $password): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nEncrypt the string.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n- `string $password \u003cp\u003eThe key for encrypting\u003c/p\u003e`\n\n**Return:**\n- `static`\n\n--------\n\n## endsWith(string $substring, bool $caseSensitive): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns true if the string ends with $substring, false otherwise. By\ndefault, the comparison is case-sensitive, but can be made insensitive\nby setting $caseSensitive to false.\n\nEXAMPLE: \u003ccode\u003e\ns('fòôbàř')-\u003eendsWith('bàř', true); // true\n\u003c/code\u003e\n\n**Parameters:**\n- `string $substring \u003cp\u003eThe substring to look for.\u003c/p\u003e`\n- `bool $caseSensitive [optional] \u003cp\u003eWhether or not to enforce case-sensitivity. Default: true\u003c/p\u003e`\n\n**Return:**\n- `bool \u003cp\u003eWhether or not $str ends with $substring.\u003c/p\u003e`\n\n--------\n\n## endsWithAny(string[] $substrings, bool $caseSensitive): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns true if the string ends with any of $substrings, false otherwise.\n\nBy default, the comparison is case-sensitive, but can be made insensitive\nby setting $caseSensitive to false.\n\nEXAMPLE: \u003ccode\u003e\ns('fòôbàř')-\u003eendsWithAny(['bàř', 'baz'], true); // true\n\u003c/code\u003e\n\n**Parameters:**\n- `string[] $substrings \u003cp\u003eSubstrings to look for.\u003c/p\u003e`\n- `bool $caseSensitive [optional] \u003cp\u003eWhether or not to enforce case-sensitivity. Default: true\u003c/p\u003e`\n\n**Return:**\n- `bool \u003cp\u003eWhether or not $str ends with $substring.\u003c/p\u003e`\n\n--------\n\n## ensureLeft(string $substring): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nEnsures that the string begins with $substring. If it doesn't, it's\nprepended.\n\nEXAMPLE: \u003ccode\u003e\ns('foobar')-\u003eensureLeft('http://'); // 'http://foobar'\n\u003c/code\u003e\n\n**Parameters:**\n- `string $substring \u003cp\u003eThe substring to add if not present.\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eObject with its $str prefixed by the $substring.\u003c/p\u003e`\n\n--------\n\n## ensureRight(string $substring): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nEnsures that the string ends with $substring. If it doesn't, it's appended.\n\nEXAMPLE: \u003ccode\u003e\ns('foobar')-\u003eensureRight('.com'); // 'foobar.com'\n\u003c/code\u003e\n\n**Parameters:**\n- `string $substring \u003cp\u003eThe substring to add if not present.\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eObject with its $str suffixed by the $substring.\u003c/p\u003e`\n\n--------\n\n## escape(): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nCreate a escape html version of the string via \"htmlspecialchars()\".\n\nEXAMPLE: \u003ccode\u003e\ns('\u003c∂∆ onerror=\"alert(xss)\"\u003e')-\u003eescape(); // '\u0026lt;∂∆ onerror=\u0026quot;alert(xss)\u0026quot;\u0026gt;'\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `static`\n\n--------\n\n## explode(string $delimiter, int $limit): array\u003cint,static\u003e\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nSplit a string by a string.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n- `string $delimiter \u003cp\u003eThe boundary string\u003c/p\u003e`\n- `int $limit [optional] \u003cp\u003eThe maximum number of elements in the exploded\n                       collection.\u003c/p\u003e\n\n- If limit is set and positive, the returned collection will contain a maximum of limit elements with the last\nelement containing the rest of string.\n- If the limit parameter is negative, all components except the last -limit are returned.\n- If the limit parameter is zero, then this is treated as 1`\n\n**Return:**\n- `array\u003cint,static\u003e`\n\n--------\n\n## explodeCollection(string $delimiter, int $limit): CollectionStringy|static[]\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nSplit a string by a string.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n- `string $delimiter \u003cp\u003eThe boundary string\u003c/p\u003e`\n- `int $limit [optional] \u003cp\u003eThe maximum number of elements in the exploded\n                       collection.\u003c/p\u003e\n\n- If limit is set and positive, the returned collection will contain a maximum of limit elements with the last\nelement containing the rest of string.\n- If the limit parameter is negative, all components except the last -limit are returned.\n- If the limit parameter is zero, then this is treated as 1`\n\n**Return:**\n- `\\CollectionStringy|static[] \u003cp\u003eAn collection of Stringy objects.\u003c/p\u003e`\n\n--------\n\n## extractIntegers(): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns the integer value of the current string.\n\nEXAMPLE: \u003ccode\u003e\ns('foo1 ba2r')-\u003eextractIntegers(); // '12'\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `static`\n\n--------\n\n## extractSpecialCharacters(): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns the special chars of the current string.\n\nEXAMPLE: \u003ccode\u003e\ns('foo1 ba2!r')-\u003eextractSpecialCharacters(); // '!'\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `static`\n\n--------\n\n## extractText(string $search, int|null $length, string $replacerForSkippedText): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nCreate an extract from a sentence, so if the search-string was found, it try to centered in the output.\n\nEXAMPLE: \u003ccode\u003e\n$sentence = 'This is only a Fork of Stringy, take a look at the new features.';\ns($sentence)-\u003eextractText('Stringy'); // '...Fork of Stringy...'\n\u003c/code\u003e\n\n**Parameters:**\n- `string $search`\n- `int|null $length [optional] \u003cp\u003eDefault: null === text-\u003elength / 2\u003c/p\u003e`\n- `string $replacerForSkippedText [optional] \u003cp\u003eDefault: …\u003c/p\u003e`\n\n**Return:**\n- `static`\n\n--------\n\n## first(int $n): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns the first $n characters of the string.\n\nEXAMPLE: \u003ccode\u003e\ns('fòôbàř')-\u003efirst(3); // 'fòô'\n\u003c/code\u003e\n\n**Parameters:**\n- `int $n \u003cp\u003eNumber of characters to retrieve from the start.\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eObject with its $str being the first $n chars.\u003c/p\u003e`\n\n--------\n\n## format(mixed $args): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturn a formatted string via sprintf + named parameters via array syntax.\n\n\u003cp\u003e\n\u003cbr\u003e\nIt will use \"sprintf()\" so you can use e.g.:\n\u003cbr\u003e\n\u003cbr\u003e\u003cpre\u003es('There are %d monkeys in the %s')-\u003eformat(5, 'tree');\u003c/pre\u003e\n\u003cbr\u003e\n\u003cbr\u003e\u003cpre\u003es('There are %2$d monkeys in the %1$s')-\u003eformat('tree', 5);\u003c/pre\u003e\n\u003cbr\u003e\n\u003cbr\u003e\nBut you can also use named parameter via array syntax e.g.:\n\u003cbr\u003e\n\u003cbr\u003e\u003cpre\u003es('There are %:count monkeys in the %:location')-\u003eformat(['count' =\u003e 5, 'location' =\u003e 'tree');\u003c/pre\u003e\n\u003c/p\u003e\n\nEXAMPLE: \u003ccode\u003e\n$input = 'one: %2$d, %1$s: 2, %:text_three: %3$d';\ns($input)-\u003eformat(['text_three' =\u003e '%4$s'], 'two', 1, 3, 'three'); // 'One: 1, two: 2, three: 3'\n\u003c/code\u003e\n\n**Parameters:**\n- `mixed ...$args [optional]`\n\n**Return:**\n- `static \u003cp\u003eA Stringy object produced according to the formatting string\nformat.\u003c/p\u003e`\n\n--------\n\n## getEncoding(): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns the encoding used by the Stringy object.\n\nEXAMPLE: \u003ccode\u003e\ns('fòôbàř', 'UTF-8')-\u003egetEncoding(); // 'UTF-8'\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `string \u003cp\u003eThe current value of the $encoding property.\u003c/p\u003e`\n\n--------\n\n## getIterator(): ArrayIterator\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns a new ArrayIterator, thus implementing the IteratorAggregate\ninterface. The ArrayIterator's constructor is passed an array of chars\nin the multibyte string. This enables the use of foreach with instances\nof Stringy\\Stringy.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `\\ArrayIterator \u003cp\u003eAn iterator for the characters in the string.\u003c/p\u003e`\n\n--------\n\n## hardWrap(int $width, string $break): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nWrap the string after an exact number of characters.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n- `int $width \u003cp\u003eNumber of characters at which to wrap.\u003c/p\u003e`\n- `string $break [optional] \u003cp\u003eCharacter used to break the string. | Default: \"\\n\"\u003c/p\u003e`\n\n**Return:**\n- `static`\n\n--------\n\n## hasLowerCase(): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns true if the string contains a lower case char, false otherwise\n\nEXAMPLE: \u003ccode\u003e\ns('fòôbàř')-\u003ehasLowerCase(); // true\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `bool \u003cp\u003eWhether or not the string contains a lower case character.\u003c/p\u003e`\n\n--------\n\n## hasUpperCase(): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns true if the string contains an upper case char, false otherwise.\n\nEXAMPLE: \u003ccode\u003e\ns('fòôbàř')-\u003ehasUpperCase(); // false\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `bool \u003cp\u003eWhether or not the string contains an upper case character.\u003c/p\u003e`\n\n--------\n\n## hash(string $algorithm): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nGenerate a hash value (message digest).\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n- `string $algorithm \u003cp\u003eName of selected hashing algorithm (i.e. \"md5\", \"sha256\", \"haval160,4\", etc..)\u003c/p\u003e`\n\n**Return:**\n- `static`\n\n--------\n\n## hexDecode(): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nDecode the string from hex.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `static`\n\n--------\n\n## hexEncode(): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nEncode string to hex.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `static`\n\n--------\n\n## htmlDecode(int $flags): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nConvert all HTML entities to their applicable characters.\n\nEXAMPLE: \u003ccode\u003e\ns('\u0026amp;')-\u003ehtmlDecode(); // '\u0026'\n\u003c/code\u003e\n\n**Parameters:**\n- `int $flags [optional] \u003cp\u003e\nA bitmask of one or more of the following flags, which specify how to handle quotes and\nwhich document type to use. The default is ENT_COMPAT.\n\u003ctable\u003e\nAvailable \u003ci\u003eflags\u003c/i\u003e constants\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003eConstant Name\u003c/td\u003e\n\u003ctd\u003eDescription\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003e\u003cb\u003eENT_COMPAT\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003eWill convert double-quotes and leave single-quotes alone.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003e\u003cb\u003eENT_QUOTES\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003eWill convert both double and single quotes.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003e\u003cb\u003eENT_NOQUOTES\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003eWill leave both double and single quotes unconverted.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003e\u003cb\u003eENT_HTML401\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003e\nHandle code as HTML 4.01.\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003e\u003cb\u003eENT_XML1\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003e\nHandle code as XML 1.\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003e\u003cb\u003eENT_XHTML\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003e\nHandle code as XHTML.\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003e\u003cb\u003eENT_HTML5\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003e\nHandle code as HTML 5.\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eObject with the resulting $str after being html decoded.\u003c/p\u003e`\n\n--------\n\n## htmlEncode(int $flags): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nConvert all applicable characters to HTML entities.\n\nEXAMPLE: \u003ccode\u003e\ns('\u0026')-\u003ehtmlEncode(); // '\u0026amp;'\n\u003c/code\u003e\n\n**Parameters:**\n- `int $flags [optional] \u003cp\u003e\nA bitmask of one or more of the following flags, which specify how to handle quotes and\nwhich document type to use. The default is ENT_COMPAT.\n\u003ctable\u003e\nAvailable \u003ci\u003eflags\u003c/i\u003e constants\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003eConstant Name\u003c/td\u003e\n\u003ctd\u003eDescription\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003e\u003cb\u003eENT_COMPAT\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003eWill convert double-quotes and leave single-quotes alone.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003e\u003cb\u003eENT_QUOTES\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003eWill convert both double and single quotes.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003e\u003cb\u003eENT_NOQUOTES\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003eWill leave both double and single quotes unconverted.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003e\u003cb\u003eENT_HTML401\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003e\nHandle code as HTML 4.01.\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003e\u003cb\u003eENT_XML1\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003e\nHandle code as XML 1.\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003e\u003cb\u003eENT_XHTML\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003e\nHandle code as XHTML.\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr valign=\"top\"\u003e\n\u003ctd\u003e\u003cb\u003eENT_HTML5\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003e\nHandle code as HTML 5.\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eObject with the resulting $str after being html encoded.\u003c/p\u003e`\n\n--------\n\n## humanize(): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nCapitalizes the first word of the string, replaces underscores with\nspaces, and strips '_id'.\n\nEXAMPLE: \u003ccode\u003e\ns('author_id')-\u003ehumanize(); // 'Author'\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `static \u003cp\u003eObject with a humanized $str.\u003c/p\u003e`\n\n--------\n\n## in(string $str, bool $caseSensitive): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nDetermine if the current string exists in another string. By\ndefault, the comparison is case-sensitive, but can be made insensitive\nby setting $caseSensitive to false.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n- `string $str \u003cp\u003eThe string to compare against.\u003c/p\u003e`\n- `bool $caseSensitive [optional] \u003cp\u003eWhether or not to enforce case-sensitivity. Default: true\u003c/p\u003e`\n\n**Return:**\n- `bool`\n\n--------\n\n## indexOf(string $needle, int $offset): false|int\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns the index of the first occurrence of $needle in the string,\nand false if not found. Accepts an optional offset from which to begin\nthe search.\n\nEXAMPLE: \u003ccode\u003e\ns('string')-\u003eindexOf('ing'); // 3\n\u003c/code\u003e\n\n**Parameters:**\n- `string $needle \u003cp\u003eSubstring to look for.\u003c/p\u003e`\n- `int $offset [optional] \u003cp\u003eOffset from which to search. Default: 0\u003c/p\u003e`\n\n**Return:**\n- `false|int \u003cp\u003eThe occurrence's \u003cstrong\u003eindex\u003c/strong\u003e if found, otherwise \u003cstrong\u003efalse\u003c/strong\u003e.\u003c/p\u003e`\n\n--------\n\n## indexOfIgnoreCase(string $needle, int $offset): false|int\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns the index of the first occurrence of $needle in the string,\nand false if not found. Accepts an optional offset from which to begin\nthe search.\n\nEXAMPLE: \u003ccode\u003e\ns('string')-\u003eindexOfIgnoreCase('ING'); // 3\n\u003c/code\u003e\n\n**Parameters:**\n- `string $needle \u003cp\u003eSubstring to look for.\u003c/p\u003e`\n- `int $offset [optional] \u003cp\u003eOffset from which to search. Default: 0\u003c/p\u003e`\n\n**Return:**\n- `false|int \u003cp\u003eThe occurrence's \u003cstrong\u003eindex\u003c/strong\u003e if found, otherwise \u003cstrong\u003efalse\u003c/strong\u003e.\u003c/p\u003e`\n\n--------\n\n## indexOfLast(string $needle, int $offset): false|int\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns the index of the last occurrence of $needle in the string,\nand false if not found. Accepts an optional offset from which to begin\nthe search. Offsets may be negative to count from the last character\nin the string.\n\nEXAMPLE: \u003ccode\u003e\ns('foobarfoo')-\u003eindexOfLast('foo'); // 10\n\u003c/code\u003e\n\n**Parameters:**\n- `string $needle \u003cp\u003eSubstring to look for.\u003c/p\u003e`\n- `int $offset [optional] \u003cp\u003eOffset from which to search. Default: 0\u003c/p\u003e`\n\n**Return:**\n- `false|int \u003cp\u003eThe last occurrence's \u003cstrong\u003eindex\u003c/strong\u003e if found, otherwise \u003cstrong\u003efalse\u003c/strong\u003e.\u003c/p\u003e`\n\n--------\n\n## indexOfLastIgnoreCase(string $needle, int $offset): false|int\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns the index of the last occurrence of $needle in the string,\nand false if not found. Accepts an optional offset from which to begin\nthe search. Offsets may be negative to count from the last character\nin the string.\n\nEXAMPLE: \u003ccode\u003e\ns('fooBarFoo')-\u003eindexOfLastIgnoreCase('foo'); // 10\n\u003c/code\u003e\n\n**Parameters:**\n- `string $needle \u003cp\u003eSubstring to look for.\u003c/p\u003e`\n- `int $offset [optional] \u003cp\u003eOffset from which to search. Default: 0\u003c/p\u003e`\n\n**Return:**\n- `false|int \u003cp\u003eThe last occurrence's \u003cstrong\u003eindex\u003c/strong\u003e if found, otherwise \u003cstrong\u003efalse\u003c/strong\u003e.\u003c/p\u003e`\n\n--------\n\n## insert(string $substring, int $index): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nInserts $substring into the string at the $index provided.\n\nEXAMPLE: \u003ccode\u003e\ns('fòôbř')-\u003einsert('à', 4); // 'fòôbàř'\n\u003c/code\u003e\n\n**Parameters:**\n- `string $substring \u003cp\u003eString to be inserted.\u003c/p\u003e`\n- `int $index \u003cp\u003eThe index at which to insert the substring.\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eObject with the resulting $str after the insertion.\u003c/p\u003e`\n\n--------\n\n## is(string $pattern): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns true if the string contains the $pattern, otherwise false.\n\nWARNING: Asterisks (\"*\") are translated into (\".*\") zero-or-more regular\nexpression wildcards.\n\nEXAMPLE: \u003ccode\u003e\ns('Foo\\\\Bar\\\\Lall')-\u003eis('*\\\\Bar\\\\*'); // true\n\u003c/code\u003e\n\n**Parameters:**\n- `string $pattern \u003cp\u003eThe string or pattern to match against.\u003c/p\u003e`\n\n**Return:**\n- `bool \u003cp\u003eWhether or not we match the provided pattern.\u003c/p\u003e`\n\n--------\n\n## isAlpha(): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns true if the string contains only alphabetic chars, false otherwise.\n\nEXAMPLE: \u003ccode\u003e\ns('丹尼爾')-\u003eisAlpha(); // true\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `bool \u003cp\u003eWhether or not $str contains only alphabetic chars.\u003c/p\u003e`\n\n--------\n\n## isAlphanumeric(): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns true if the string contains only alphabetic and numeric chars, false otherwise.\n\nEXAMPLE: \u003ccode\u003e\ns('دانيال1')-\u003eisAlphanumeric(); // true\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `bool \u003cp\u003eWhether or not $str contains only alphanumeric chars.\u003c/p\u003e`\n\n--------\n\n## isAscii(): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nChecks if a string is 7 bit ASCII.\n\nEXAMPLE: \u003ccode\u003es('白')-\u003eisAscii; // false\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `bool \u003cp\u003e\n\u003cstrong\u003etrue\u003c/strong\u003e if it is ASCII\u003cbr\u003e\n\u003cstrong\u003efalse\u003c/strong\u003e otherwise\n\u003c/p\u003e`\n\n--------\n\n## isBase64(bool $emptyStringIsValid): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns true if the string is base64 encoded, false otherwise.\n\nEXAMPLE: \u003ccode\u003e\ns('Zm9vYmFy')-\u003eisBase64(); // true\n\u003c/code\u003e\n\n**Parameters:**\n- `bool $emptyStringIsValid`\n\n**Return:**\n- `bool \u003cp\u003eWhether or not $str is base64 encoded.\u003c/p\u003e`\n\n--------\n\n## isBinary(): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nCheck if the input is binary... (is look like a hack).\n\nEXAMPLE: \u003ccode\u003es(01)-\u003eisBinary(); // true\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `bool`\n\n--------\n\n## isBlank(): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns true if the string contains only whitespace chars, false otherwise.\n\nEXAMPLE: \u003ccode\u003e\ns(\"\\n\\t  \\v\\f\")-\u003eisBlank(); // true\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `bool \u003cp\u003eWhether or not $str contains only whitespace characters.\u003c/p\u003e`\n\n--------\n\n## isBom(): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nChecks if the given string is equal to any \"Byte Order Mark\".\n\nWARNING: Use \"s::string_has_bom()\" if you will check BOM in a string.\n\nEXAMPLE: \u003ccode\u003es-\u003e(\"\\xef\\xbb\\xbf\")-\u003eisBom(); // true\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `bool \u003cp\u003e\u003cstrong\u003etrue\u003c/strong\u003e if the $utf8_chr is Byte Order Mark, \u003cstrong\u003efalse\u003c/strong\u003e otherwise.\u003c/p\u003e`\n\n--------\n\n## isEmail(bool $useExampleDomainCheck, bool $useTypoInDomainCheck, bool $useTemporaryDomainCheck, bool $useDnsCheck): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns true if the string contains a valid E-Mail address, false otherwise.\n\nEXAMPLE: \u003ccode\u003e\ns('lars@moelleken.org')-\u003eisEmail(); // true\n\u003c/code\u003e\n\n**Parameters:**\n- `bool $useExampleDomainCheck [optional] \u003cp\u003eDefault: false\u003c/p\u003e`\n- `bool $useTypoInDomainCheck [optional] \u003cp\u003eDefault: false\u003c/p\u003e`\n- `bool $useTemporaryDomainCheck [optional] \u003cp\u003eDefault: false\u003c/p\u003e`\n- `bool $useDnsCheck [optional] \u003cp\u003eDefault: false\u003c/p\u003e`\n\n**Return:**\n- `bool \u003cp\u003eWhether or not $str contains a valid E-Mail address.\u003c/p\u003e`\n\n--------\n\n## isEmpty(): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nDetermine whether the string is considered to be empty.\n\nA variable is considered empty if it does not exist or if its value equals FALSE.\n\nEXAMPLE: \u003ccode\u003e\ns('')-\u003eisEmpty(); // true\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `bool \u003cp\u003eWhether or not $str is empty().\u003c/p\u003e`\n\n--------\n\n## isEquals(string|\\Stringy $str): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nDetermine whether the string is equals to $str.\n\nAlias for isEqualsCaseSensitive()\n\nEXAMPLE: \u003ccode\u003e\ns('foo')-\u003eisEquals('foo'); // true\n\u003c/code\u003e\n\n**Parameters:**\n- `string|\\Stringy ...$str`\n\n**Return:**\n- `bool`\n\n--------\n\n## isEqualsCaseInsensitive(float|int|string|\\Stringy $str): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nDetermine whether the string is equals to $str.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n- `float|int|string|\\Stringy ...$str \u003cp\u003eThe string to compare.\u003c/p\u003e`\n\n**Return:**\n- `bool \u003cp\u003eWhether or not $str is equals.\u003c/p\u003e`\n\n--------\n\n## isEqualsCaseSensitive(float|int|string|\\Stringy $str): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nDetermine whether the string is equals to $str.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n- `float|int|string|\\Stringy ...$str \u003cp\u003eThe string to compare.\u003c/p\u003e`\n\n**Return:**\n- `bool \u003cp\u003eWhether or not $str is equals.\u003c/p\u003e`\n\n--------\n\n## isHexadecimal(): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns true if the string contains only hexadecimal chars, false otherwise.\n\nEXAMPLE: \u003ccode\u003e\ns('A102F')-\u003eisHexadecimal(); // true\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `bool \u003cp\u003eWhether or not $str contains only hexadecimal chars.\u003c/p\u003e`\n\n--------\n\n## isHtml(): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns true if the string contains HTML-Tags, false otherwise.\n\nEXAMPLE: \u003ccode\u003e\ns('\u003ch1\u003efoo\u003c/h1\u003e')-\u003eisHtml(); // true\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `bool \u003cp\u003eWhether or not $str contains HTML-Tags.\u003c/p\u003e`\n\n--------\n\n## isJson(bool $onlyArrayOrObjectResultsAreValid): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns true if the string is JSON, false otherwise. Unlike json_decode\nin PHP 5.x, this method is consistent with PHP 7 and other JSON parsers,\nin that an empty string is not considered valid JSON.\n\nEXAMPLE: \u003ccode\u003e\ns('{\"foo\":\"bar\"}')-\u003eisJson(); // true\n\u003c/code\u003e\n\n**Parameters:**\n- `bool $onlyArrayOrObjectResultsAreValid`\n\n**Return:**\n- `bool \u003cp\u003eWhether or not $str is JSON.\u003c/p\u003e`\n\n--------\n\n## isLowerCase(): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns true if the string contains only lower case chars, false otherwise.\n\nEXAMPLE: \u003ccode\u003e\ns('fòôbàř')-\u003eisLowerCase(); // true\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `bool \u003cp\u003eWhether or not $str contains only lower case characters.\u003c/p\u003e`\n\n--------\n\n## isNotEmpty(): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nDetermine whether the string is considered to be NOT empty.\n\nA variable is considered NOT empty if it does exist or if its value equals TRUE.\n\nEXAMPLE: \u003ccode\u003e\ns('')-\u003eisNotEmpty(); // false\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `bool \u003cp\u003eWhether or not $str is empty().\u003c/p\u003e`\n\n--------\n\n## isNumeric(): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nDetermine if the string is composed of numeric characters.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `bool`\n\n--------\n\n## isPrintable(): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nDetermine if the string is composed of printable (non-invisible) characters.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `bool`\n\n--------\n\n## isPunctuation(): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nDetermine if the string is composed of punctuation characters.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `bool`\n\n--------\n\n## isSerialized(): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns true if the string is serialized, false otherwise.\n\nEXAMPLE: \u003ccode\u003e\ns('a:1:{s:3:\"foo\";s:3:\"bar\";}')-\u003eisSerialized(); // true\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `bool \u003cp\u003eWhether or not $str is serialized.\u003c/p\u003e`\n\n--------\n\n## isSimilar(string $str, float $minPercentForSimilarity): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nCheck if two strings are similar.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n- `string $str \u003cp\u003eThe string to compare against.\u003c/p\u003e`\n- `float $minPercentForSimilarity [optional] \u003cp\u003eThe percentage of needed similarity. | Default: 80%\u003c/p\u003e`\n\n**Return:**\n- `bool`\n\n--------\n\n## isUpperCase(): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns true if the string contains only lower case chars, false\notherwise.\n\nEXAMPLE: \u003ccode\u003e\ns('FÒÔBÀŘ')-\u003eisUpperCase(); // true\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `bool \u003cp\u003eWhether or not $str contains only lower case characters.\u003c/p\u003e`\n\n--------\n\n## isUrl(bool $disallow_localhost): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\n/**\nCheck if $url is an correct url.\n\n**Parameters:**\n- `bool $disallow_localhost`\n\n**Return:**\n- `bool`\n\n--------\n\n## isUtf8(bool $strict): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nChecks whether the passed input contains only byte sequences that appear valid UTF-8.\n\nEXAMPLE: \u003ccode\u003e\ns('Iñtërnâtiônàlizætiøn')-\u003eisUtf8(); // true\n//\ns(\"Iñtërnâtiônàlizætiøn\\xA0\\xA1\")-\u003eisUtf8(); // false\n\u003c/code\u003e\n\n**Parameters:**\n- `bool $strict \u003cp\u003eCheck also if the string is not UTF-16 or UTF-32.\u003c/p\u003e`\n\n**Return:**\n- `bool`\n\n--------\n\n## isUtf16(): false|int\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nCheck if the string is UTF-16.\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `false|int \u003cstrong\u003efalse\u003c/strong\u003e if is't not UTF-16,\u003cbr\u003e\n\u003cstrong\u003e1\u003c/strong\u003e for UTF-16LE,\u003cbr\u003e\n\u003cstrong\u003e2\u003c/strong\u003e for UTF-16BE`\n\n--------\n\n## isUtf32(): false|int\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nCheck if the string is UTF-32.\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `false|int \u003cstrong\u003efalse\u003c/strong\u003e if is't not UTF-32,\u003cbr\u003e\n\u003cstrong\u003e1\u003c/strong\u003e for UTF-32LE,\u003cbr\u003e\n\u003cstrong\u003e2\u003c/strong\u003e for UTF-32BE`\n\n--------\n\n## isWhitespace(): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns true if the string contains only whitespace chars, false otherwise.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `bool \u003cp\u003eWhether or not $str contains only whitespace characters.\u003c/p\u003e`\n\n--------\n\n## jsonSerialize(): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns value which can be serialized by json_encode().\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `string The current value of the $str property`\n\n--------\n\n## kebabCase(): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nConvert the string to kebab-case.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `static`\n\n--------\n\n## last(int $n): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns the last $n characters of the string.\n\nEXAMPLE: \u003ccode\u003e\ns('fòôbàř')-\u003elast(3); // 'bàř'\n\u003c/code\u003e\n\n**Parameters:**\n- `int $n \u003cp\u003eNumber of characters to retrieve from the end.\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eObject with its $str being the last $n chars.\u003c/p\u003e`\n\n--------\n\n## lastSubstringOf(string $needle, bool $beforeNeedle): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nGets the substring after (or before via \"$beforeNeedle\") the last occurrence of the \"$needle\".\n\nIf no match is found returns new empty Stringy object.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n- `string $needle \u003cp\u003eThe string to look for.\u003c/p\u003e`\n- `bool $beforeNeedle [optional] \u003cp\u003eDefault: false\u003c/p\u003e`\n\n**Return:**\n- `static`\n\n--------\n\n## lastSubstringOfIgnoreCase(string $needle, bool $beforeNeedle): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nGets the substring after (or before via \"$beforeNeedle\") the last occurrence of the \"$needle\".\n\nIf no match is found returns new empty Stringy object.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n- `string $needle \u003cp\u003eThe string to look for.\u003c/p\u003e`\n- `bool $beforeNeedle [optional] \u003cp\u003eDefault: false\u003c/p\u003e`\n\n**Return:**\n- `static`\n\n--------\n\n## length(): int\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns the length of the string.\n\nEXAMPLE: \u003ccode\u003e\ns('fòôbàř')-\u003elength(); // 6\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `int \u003cp\u003eThe number of characters in $str given the encoding.\u003c/p\u003e`\n\n--------\n\n## lineWrap(int $limit, string $break, bool $add_final_break, string|null $delimiter): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nLine-Wrap the string after $limit, but also after the next word.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n- `int $limit [optional] \u003cp\u003eThe column width.\u003c/p\u003e`\n- `string $break [optional] \u003cp\u003eThe line is broken using the optional break parameter.\u003c/p\u003e`\n- `bool $add_final_break [optional] \u003cp\u003e\nIf this flag is true, then the method will add a $break at the end\nof the result string.\n\u003c/p\u003e`\n- `string|null $delimiter [optional] \u003cp\u003e\nYou can change the default behavior, where we split the string by newline.\n\u003c/p\u003e`\n\n**Return:**\n- `static`\n\n--------\n\n## lineWrapAfterWord(int $limit, string $break, bool $add_final_break, string|null $delimiter): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nLine-Wrap the string after $limit, but also after the next word.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n- `int $limit [optional] \u003cp\u003eThe column width.\u003c/p\u003e`\n- `string $break [optional] \u003cp\u003eThe line is broken using the optional break parameter.\u003c/p\u003e`\n- `bool $add_final_break [optional] \u003cp\u003e\nIf this flag is true, then the method will add a $break at the end\nof the result string.\n\u003c/p\u003e`\n- `string|null $delimiter [optional] \u003cp\u003e\nYou can change the default behavior, where we split the string by newline.\n\u003c/p\u003e`\n\n**Return:**\n- `static`\n\n--------\n\n## lines(): static[]\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nSplits on newlines and carriage returns, returning an array of Stringy\nobjects corresponding to the lines in the string.\n\nEXAMPLE: \u003ccode\u003e\ns(\"fòô\\r\\nbàř\\n\")-\u003elines(); // ['fòô', 'bàř', '']\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `static[] \u003cp\u003eAn array of Stringy objects.\u003c/p\u003e`\n\n--------\n\n## linesCollection(): CollectionStringy|static[]\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nSplits on newlines and carriage returns, returning an array of Stringy\nobjects corresponding to the lines in the string.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `\\CollectionStringy|static[] \u003cp\u003eAn collection of Stringy objects.\u003c/p\u003e`\n\n--------\n\n## longestCommonPrefix(string $otherStr): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns the longest common prefix between the string and $otherStr.\n\nEXAMPLE: \u003ccode\u003e\ns('foobar')-\u003elongestCommonPrefix('foobaz'); // 'fooba'\n\u003c/code\u003e\n\n**Parameters:**\n- `string $otherStr \u003cp\u003eSecond string for comparison.\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eObject with its $str being the longest common prefix.\u003c/p\u003e`\n\n--------\n\n## longestCommonSubstring(string $otherStr): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns the longest common substring between the string and $otherStr.\n\nIn the case of ties, it returns that which occurs first.\n\nEXAMPLE: \u003ccode\u003e\ns('foobar')-\u003elongestCommonSubstring('boofar'); // 'oo'\n\u003c/code\u003e\n\n**Parameters:**\n- `string $otherStr \u003cp\u003eSecond string for comparison.\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eObject with its $str being the longest common substring.\u003c/p\u003e`\n\n--------\n\n## longestCommonSuffix(string $otherStr): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns the longest common suffix between the string and $otherStr.\n\nEXAMPLE: \u003ccode\u003e\ns('fòôbàř')-\u003elongestCommonSuffix('fòrbàř'); // 'bàř'\n\u003c/code\u003e\n\n**Parameters:**\n- `string $otherStr \u003cp\u003eSecond string for comparison.\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eObject with its $str being the longest common suffix.\u003c/p\u003e`\n\n--------\n\n## lowerCaseFirst(): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nConverts the first character of the string to lower case.\n\nEXAMPLE: \u003ccode\u003e\ns('Σ Foo')-\u003elowerCaseFirst(); // 'σ Foo'\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `static \u003cp\u003eObject with the first character of $str being lower case.\u003c/p\u003e`\n\n--------\n\n## matchCaseInsensitive(string|\\Stringy $str): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nDetermine if the string matches another string regardless of case.\n\nAlias for isEqualsCaseInsensitive()\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n- `string|\\Stringy ...$str \u003cp\u003eThe string to compare against.\u003c/p\u003e`\n\n**Return:**\n- `bool`\n\n--------\n\n## matchCaseSensitive(string|\\Stringy $str): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nDetermine if the string matches another string.\n\nAlias for isEqualsCaseSensitive()\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n- `string|\\Stringy ...$str \u003cp\u003eThe string to compare against.\u003c/p\u003e`\n\n**Return:**\n- `bool`\n\n--------\n\n## md5(): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nCreate a md5 hash from the current string.\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `static`\n\n--------\n\n## newLineToHtmlBreak(): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReplace all breaks [\u003cbr\u003e | \\r\\n | \\r | \\n | ...] into \"\u003cbr\u003e\".\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `static`\n\n--------\n\n## nth(int $step, int $offset): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nGet every nth character of the string.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n- `int $step \u003cp\u003eThe number of characters to step.\u003c/p\u003e`\n- `int $offset [optional] \u003cp\u003eThe string offset to start at.\u003c/p\u003e`\n\n**Return:**\n- `static`\n\n--------\n\n## offsetExists(int $offset): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns whether or not a character exists at an index. Offsets may be\nnegative to count from the last character in the string. Implements\npart of the ArrayAccess interface.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n- `int $offset \u003cp\u003eThe index to check.\u003c/p\u003e`\n\n**Return:**\n- `bool \u003cp\u003eWhether or not the index exists.\u003c/p\u003e`\n\n--------\n\n## offsetGet(int $offset): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns the character at the given index. Offsets may be negative to\ncount from the last character in the string. Implements part of the\nArrayAccess interface, and throws an OutOfBoundsException if the index\ndoes not exist.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n- `int $offset \u003cp\u003eThe \u003cstrong\u003eindex\u003c/strong\u003e from which to retrieve the char.\u003c/p\u003e`\n\n**Return:**\n- `string \u003cp\u003eThe character at the specified index.\u003c/p\u003e`\n\n--------\n\n## offsetSet(int $offset, mixed $value): void\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nImplements part of the ArrayAccess interface, but throws an exception\nwhen called. This maintains the immutability of Stringy objects.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n- `int $offset \u003cp\u003eThe index of the character.\u003c/p\u003e`\n- `mixed $value \u003cp\u003eValue to set.\u003c/p\u003e`\n\n**Return:**\n- `void`\n\n--------\n\n## offsetUnset(int $offset): void\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nImplements part of the ArrayAccess interface, but throws an exception\nwhen called. This maintains the immutability of Stringy objects.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n- `int $offset \u003cp\u003eThe index of the character.\u003c/p\u003e`\n\n**Return:**\n- `void`\n\n--------\n\n## pad(int $length, string $padStr, string $padType): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nPads the string to a given length with $padStr. If length is less than\nor equal to the length of the string, no padding takes places. The\ndefault string used for padding is a space, and the default type (one of\n'left', 'right', 'both') is 'right'. Throws an InvalidArgumentException\nif $padType isn't one of those 3 values.\n\nEXAMPLE: \u003ccode\u003e\ns('fòôbàř')-\u003epad(9, '-/', 'left'); // '-/-fòôbàř'\n\u003c/code\u003e\n\n**Parameters:**\n- `int $length \u003cp\u003eDesired string length after padding.\u003c/p\u003e`\n- `string $padStr [optional] \u003cp\u003eString used to pad, defaults to space. Default: ' '\u003c/p\u003e`\n- `string $padType [optional] \u003cp\u003eOne of 'left', 'right', 'both'. Default: 'right'\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eObject with a padded $str.\u003c/p\u003e`\n\n--------\n\n## padBoth(int $length, string $padStr): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns a new string of a given length such that both sides of the\nstring are padded. Alias for pad() with a $padType of 'both'.\n\nEXAMPLE: \u003ccode\u003e\ns('foo bar')-\u003epadBoth(9, ' '); // ' foo bar '\n\u003c/code\u003e\n\n**Parameters:**\n- `int $length \u003cp\u003eDesired string length after padding.\u003c/p\u003e`\n- `string $padStr [optional] \u003cp\u003eString used to pad, defaults to space. Default: ' '\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eString with padding applied.\u003c/p\u003e`\n\n--------\n\n## padLeft(int $length, string $padStr): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns a new string of a given length such that the beginning of the\nstring is padded. Alias for pad() with a $padType of 'left'.\n\nEXAMPLE: \u003ccode\u003e\ns('foo bar')-\u003epadLeft(9, ' '); // '  foo bar'\n\u003c/code\u003e\n\n**Parameters:**\n- `int $length \u003cp\u003eDesired string length after padding.\u003c/p\u003e`\n- `string $padStr [optional] \u003cp\u003eString used to pad, defaults to space. Default: ' '\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eString with left padding.\u003c/p\u003e`\n\n--------\n\n## padRight(int $length, string $padStr): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns a new string of a given length such that the end of the string\nis padded. Alias for pad() with a $padType of 'right'.\n\nEXAMPLE: \u003ccode\u003e\ns('foo bar')-\u003epadRight(10, '_*'); // 'foo bar_*_'\n\u003c/code\u003e\n\n**Parameters:**\n- `int $length \u003cp\u003eDesired string length after padding.\u003c/p\u003e`\n- `string $padStr [optional] \u003cp\u003eString used to pad, defaults to space. Default: ' '\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eString with right padding.\u003c/p\u003e`\n\n--------\n\n## pascalCase(): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nConvert the string to PascalCase.\n\nAlias for studlyCase()\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `static`\n\n--------\n\n## prepend(string $prefix): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns a new string starting with $prefix.\n\nEXAMPLE: \u003ccode\u003e\ns('bàř')-\u003eprepend('fòô'); // 'fòôbàř'\n\u003c/code\u003e\n\n**Parameters:**\n- `string ...$prefix \u003cp\u003eThe string to append.\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eObject with appended $prefix.\u003c/p\u003e`\n\n--------\n\n## prependStringy(\\CollectionStringy|static $prefix): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns a new string starting with $prefix.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n- `CollectionStringy\u003cint, static\u003e|static ...$prefix \u003cp\u003eThe Stringy objects to append.\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eObject with appended $prefix.\u003c/p\u003e`\n\n--------\n\n## regexReplace(string $pattern, string $replacement, string $options, string $delimiter): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReplaces all occurrences of $pattern in $str by $replacement.\n\nEXAMPLE: \u003ccode\u003e\ns('fòô ')-\u003eregexReplace('f[òô]+\\s', 'bàř'); // 'bàř'\ns('fò')-\u003eregexReplace('(ò)', '\\\\1ô'); // 'fòô'\n\u003c/code\u003e\n\n**Parameters:**\n- `string $pattern \u003cp\u003eThe regular expression pattern.\u003c/p\u003e`\n- `string $replacement \u003cp\u003eThe string to replace with.\u003c/p\u003e`\n- `string $options [optional] \u003cp\u003eMatching conditions to be used.\u003c/p\u003e`\n- `string $delimiter [optional] \u003cp\u003eDelimiter the the regex. Default: '/'\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eObject with the result2ing $str after the replacements.\u003c/p\u003e`\n\n--------\n\n## removeHtml(string $allowableTags): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nRemove html via \"strip_tags()\" from the string.\n\nEXAMPLE: \u003ccode\u003e\ns('řàb \u003cô\u003eòf\\', ô\u003cbr/\u003efoo \u003ca href=\"#\"\u003elall\u003c/a\u003e')-\u003eremoveHtml('\u003cbr\u003e\u003cbr/\u003e'); // 'řàb òf\\', ô\u003cbr/\u003efoo lall'\n\u003c/code\u003e\n\n**Parameters:**\n- `string $allowableTags [optional] \u003cp\u003eYou can use the optional second parameter to specify tags which should\nnot be stripped. Default: null\n\u003c/p\u003e`\n\n**Return:**\n- `static`\n\n--------\n\n## removeHtmlBreak(string $replacement): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nRemove all breaks [\u003cbr\u003e | \\r\\n | \\r | \\n | ...] from the string.\n\nEXAMPLE: \u003ccode\u003e\ns('řàb \u003cô\u003eòf\\', ô\u003cbr/\u003efoo \u003ca href=\"#\"\u003elall\u003c/a\u003e')-\u003eremoveHtmlBreak(''); // 'řàb \u003cô\u003eòf\\', ô\u003c foo \u003ca href=\"#\"\u003elall\u003c/a\u003e'\n\u003c/code\u003e\n\n**Parameters:**\n- `string $replacement [optional] \u003cp\u003eDefault is a empty string.\u003c/p\u003e`\n\n**Return:**\n- `static`\n\n--------\n\n## removeLeft(string $substring): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns a new string with the prefix $substring removed, if present.\n\nEXAMPLE: \u003ccode\u003e\ns('fòôbàř')-\u003eremoveLeft('fòô'); // 'bàř'\n\u003c/code\u003e\n\n**Parameters:**\n- `string $substring \u003cp\u003eThe prefix to remove.\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eObject having a $str without the prefix $substring.\u003c/p\u003e`\n\n--------\n\n## removeRight(string $substring): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns a new string with the suffix $substring removed, if present.\n\nEXAMPLE: \u003ccode\u003e\ns('fòôbàř')-\u003eremoveRight('bàř'); // 'fòô'\n\u003c/code\u003e\n\n**Parameters:**\n- `string $substring \u003cp\u003eThe suffix to remove.\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eObject having a $str without the suffix $substring.\u003c/p\u003e`\n\n--------\n\n## removeXss(): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nTry to remove all XSS-attacks from the string.\n\nEXAMPLE: \u003ccode\u003e\ns('\u003cIMG SRC=\u0026#x6A\u0026#x61\u0026#x76\u0026#x61\u0026#x73\u0026#x63\u0026#x72\u0026#x69\u0026#x70\u0026#x74\u0026#x3A\u0026#x61\u0026#x6C\u0026#x65\u0026#x72\u0026#x74\u0026#x28\u0026#x27\u0026#x58\u0026#x53\u0026#x53\u0026#x27\u0026#x29\u003e')-\u003eremoveXss(); // '\u003cIMG \u003e'\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `static`\n\n--------\n\n## repeat(int $multiplier): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns a repeated string given a multiplier.\n\nEXAMPLE: \u003ccode\u003e\ns('α')-\u003erepeat(3); // 'ααα'\n\u003c/code\u003e\n\n**Parameters:**\n- `int $multiplier \u003cp\u003eThe number of times to repeat the string.\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eObject with a repeated str.\u003c/p\u003e`\n\n--------\n\n## replace(string $search, string $replacement, bool $caseSensitive): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReplaces all occurrences of $search in $str by $replacement.\n\nEXAMPLE: \u003ccode\u003e\ns('fòô bàř fòô bàř')-\u003ereplace('fòô ', ''); // 'bàř bàř'\n\u003c/code\u003e\n\n**Parameters:**\n- `string $search \u003cp\u003eThe needle to search for.\u003c/p\u003e`\n- `string $replacement \u003cp\u003eThe string to replace with.\u003c/p\u003e`\n- `bool $caseSensitive [optional] \u003cp\u003eWhether or not to enforce case-sensitivity. Default: true\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eObject with the resulting $str after the replacements.\u003c/p\u003e`\n\n--------\n\n## replaceAll(string[] $search, string|string[] $replacement, bool $caseSensitive): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReplaces all occurrences of $search in $str by $replacement.\n\nEXAMPLE: \u003ccode\u003e\ns('fòô bàř lall bàř')-\u003ereplaceAll(['fòÔ ', 'lall'], '', false); // 'bàř bàř'\n\u003c/code\u003e\n\n**Parameters:**\n- `string[] $search \u003cp\u003eThe elements to search for.\u003c/p\u003e`\n- `string|string[] $replacement \u003cp\u003eThe string to replace with.\u003c/p\u003e`\n- `bool $caseSensitive [optional] \u003cp\u003eWhether or not to enforce case-sensitivity. Default: true\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eObject with the resulting $str after the replacements.\u003c/p\u003e`\n\n--------\n\n## replaceBeginning(string $search, string $replacement): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReplaces all occurrences of $search from the beginning of string with $replacement.\n\nEXAMPLE: \u003ccode\u003e\ns('fòô bàř fòô bàř')-\u003ereplaceBeginning('fòô', ''); // ' bàř bàř'\n\u003c/code\u003e\n\n**Parameters:**\n- `string $search \u003cp\u003eThe string to search for.\u003c/p\u003e`\n- `string $replacement \u003cp\u003eThe replacement.\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eObject with the resulting $str after the replacements.\u003c/p\u003e`\n\n--------\n\n## replaceEnding(string $search, string $replacement): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReplaces all occurrences of $search from the ending of string with $replacement.\n\nEXAMPLE: \u003ccode\u003e\ns('fòô bàř fòô bàř')-\u003ereplaceEnding('bàř', ''); // 'fòô bàř fòô '\n\u003c/code\u003e\n\n**Parameters:**\n- `string $search \u003cp\u003eThe string to search for.\u003c/p\u003e`\n- `string $replacement \u003cp\u003eThe replacement.\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eObject with the resulting $str after the replacements.\u003c/p\u003e`\n\n--------\n\n## replaceFirst(string $search, string $replacement): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReplaces first occurrences of $search from the beginning of string with $replacement.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n- `string $search \u003cp\u003eThe string to search for.\u003c/p\u003e`\n- `string $replacement \u003cp\u003eThe replacement.\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eObject with the resulting $str after the replacements.\u003c/p\u003e`\n\n--------\n\n## replaceLast(string $search, string $replacement): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReplaces last occurrences of $search from the ending of string with $replacement.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n- `string $search \u003cp\u003eThe string to search for.\u003c/p\u003e`\n- `string $replacement \u003cp\u003eThe replacement.\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eObject with the resulting $str after the replacements.\u003c/p\u003e`\n\n--------\n\n## reverse(): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns a reversed string. A multibyte version of strrev().\n\nEXAMPLE: \u003ccode\u003e\ns('fòôbàř')-\u003ereverse(); // 'řàbôòf'\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `static \u003cp\u003eObject with a reversed $str.\u003c/p\u003e`\n\n--------\n\n## safeTruncate(int $length, string $substring, bool $ignoreDoNotSplitWordsForOneWord): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nTruncates the string to a given length, while ensuring that it does not\nsplit words. If $substring is provided, and truncating occurs, the\nstring is further truncated so that the substring may be appended without\nexceeding the desired length.\n\nEXAMPLE: \u003ccode\u003e\ns('What are your plans today?')-\u003esafeTruncate(22, '...'); // 'What are your plans...'\n\u003c/code\u003e\n\n**Parameters:**\n- `int $length \u003cp\u003eDesired length of the truncated string.\u003c/p\u003e`\n- `string $substring [optional] \u003cp\u003eThe substring to append if it can fit. Default: ''\u003c/p\u003e`\n- `bool $ignoreDoNotSplitWordsForOneWord`\n\n**Return:**\n- `static \u003cp\u003eObject with the resulting $str after truncating.\u003c/p\u003e`\n\n--------\n\n## setInternalEncoding(string $new_encoding): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nSet the internal character encoding.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n- `string $new_encoding \u003cp\u003eThe desired character encoding.\u003c/p\u003e`\n\n**Return:**\n- `static`\n\n--------\n\n## sha1(): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nCreate a sha1 hash from the current string.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `static`\n\n--------\n\n## sha256(): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nCreate a sha256 hash from the current string.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `static`\n\n--------\n\n## sha512(): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nCreate a sha512 hash from the current string.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `static`\n\n--------\n\n## shortenAfterWord(int $length, string $strAddOn): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nShorten the string after $length, but also after the next word.\n\nEXAMPLE: \u003ccode\u003e\ns('this is a test')-\u003eshortenAfterWord(2, '...'); // 'this...'\n\u003c/code\u003e\n\n**Parameters:**\n- `int $length \u003cp\u003eThe given length.\u003c/p\u003e`\n- `string $strAddOn [optional] \u003cp\u003eDefault: '…'\u003c/p\u003e`\n\n**Return:**\n- `static`\n\n--------\n\n## shuffle(): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nA multibyte string shuffle function. It returns a string with its\ncharacters in random order.\n\nEXAMPLE: \u003ccode\u003e\ns('fòôbàř')-\u003eshuffle(); // 'àôřbòf'\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `static \u003cp\u003eObject with a shuffled $str.\u003c/p\u003e`\n\n--------\n\n## similarity(string $str): float\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nCalculate the similarity between two strings.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n- `string $str \u003cp\u003eThe delimiting string.\u003c/p\u003e`\n\n**Return:**\n- `float`\n\n--------\n\n## slice(int $start, int $end): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns the substring beginning at $start, and up to, but not including\nthe index specified by $end. If $end is omitted, the function extracts\nthe remaining string. If $end is negative, it is computed from the end\nof the string.\n\nEXAMPLE: \u003ccode\u003e\ns('fòôbàř')-\u003eslice(3, -1); // 'bà'\n\u003c/code\u003e\n\n**Parameters:**\n- `int $start \u003cp\u003eInitial index from which to begin extraction.\u003c/p\u003e`\n- `int $end [optional] \u003cp\u003eIndex at which to end extraction. Default: null\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eObject with its $str being the extracted substring.\u003c/p\u003e`\n\n--------\n\n## slugify(string $separator, string $language, string[] $replacements, bool $replace_extra_symbols, bool $use_str_to_lower, bool $use_transliterate): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nConverts the string into an URL slug. This includes replacing non-ASCII\ncharacters with their closest ASCII equivalents, removing remaining\nnon-ASCII and non-alphanumeric characters, and replacing whitespace with\n$separator. The separator defaults to a single dash, and the string\nis also converted to lowercase. The language of the source string can\nalso be supplied for language-specific transliteration.\n\nEXAMPLE: \u003ccode\u003e\ns('Using strings like fòô bàř')-\u003eslugify(); // 'using-strings-like-foo-bar'\n\u003c/code\u003e\n\n**Parameters:**\n- `string $separator [optional] \u003cp\u003eThe string used to replace whitespace.\u003c/p\u003e`\n- `ASCII::*_LANGUAGE_CODE $language [optional] \u003cp\u003eLanguage of the source string.\u003c/p\u003e`\n- `array\u003cstring, string\u003e $replacements [optional] \u003cp\u003eA map of replaceable strings.\u003c/p\u003e`\n- `bool $replace_extra_symbols [optional]  \u003cp\u003eAdd some more replacements e.g. \"£\" with \"\npound \".\u003c/p\u003e`\n- `bool $use_str_to_lower [optional] \u003cp\u003eUse \"string to lower\" for the input.\u003c/p\u003e`\n- `bool $use_transliterate [optional]  \u003cp\u003eUse ASCII::to_transliterate() for unknown\nchars.\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eObject whose $str has been converted to an URL slug.\u003c/p\u003e`\n\n--------\n\n## snakeCase(): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nConvert the string to snake_case.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `static`\n\n--------\n\n## snakeize(): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nConvert a string to snake_case.\n\nEXAMPLE: \u003ccode\u003e\ns('foo1 Bar')-\u003esnakeize(); // 'foo_1_bar'\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `static \u003cp\u003eObject with $str in snake_case.\u003c/p\u003e`\n\n--------\n\n## softWrap(int $width, string $break): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nWrap the string after the first whitespace character after a given number\nof characters.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n- `int $width \u003cp\u003eNumber of characters at which to wrap.\u003c/p\u003e`\n- `string $break [optional] \u003cp\u003eCharacter used to break the string. | Default \"\\n\"\u003c/p\u003e`\n\n**Return:**\n- `static`\n\n--------\n\n## split(string $pattern, int $limit): static[]\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nSplits the string with the provided regular expression, returning an\narray of Stringy objects. An optional integer $limit will truncate the\nresults.\n\nEXAMPLE: \u003ccode\u003e\ns('foo,bar,baz')-\u003esplit(',', 2); // ['foo', 'bar']\n\u003c/code\u003e\n\n**Parameters:**\n- `string $pattern \u003cp\u003eThe regex with which to split the string.\u003c/p\u003e`\n- `int $limit [optional] \u003cp\u003eMaximum number of results to return. Default: -1 === no\nlimit\u003c/p\u003e`\n\n**Return:**\n- `static[] \u003cp\u003eAn array of Stringy objects.\u003c/p\u003e`\n\n--------\n\n## splitCollection(string $pattern, int $limit): CollectionStringy|static[]\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nSplits the string with the provided regular expression, returning an\ncollection of Stringy objects. An optional integer $limit will truncate the\nresults.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n- `string $pattern \u003cp\u003eThe regex with which to split the string.\u003c/p\u003e`\n- `int $limit [optional] \u003cp\u003eMaximum number of results to return. Default: -1 === no\nlimit\u003c/p\u003e`\n\n**Return:**\n- `\\CollectionStringy|static[] \u003cp\u003eAn collection of Stringy objects.\u003c/p\u003e`\n\n--------\n\n## startsWith(string $substring, bool $caseSensitive): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns true if the string begins with $substring, false otherwise. By\ndefault, the comparison is case-sensitive, but can be made insensitive\nby setting $caseSensitive to false.\n\nEXAMPLE: \u003ccode\u003e\ns('FÒÔbàřbaz')-\u003estartsWith('fòôbàř', false); // true\n\u003c/code\u003e\n\n**Parameters:**\n- `string $substring \u003cp\u003eThe substring to look for.\u003c/p\u003e`\n- `bool $caseSensitive [optional] \u003cp\u003eWhether or not to enforce case-sensitivity. Default: true\u003c/p\u003e`\n\n**Return:**\n- `bool \u003cp\u003eWhether or not $str starts with $substring.\u003c/p\u003e`\n\n--------\n\n## startsWithAny(string[] $substrings, bool $caseSensitive): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns true if the string begins with any of $substrings, false otherwise.\n\nBy default the comparison is case-sensitive, but can be made insensitive by\nsetting $caseSensitive to false.\n\nEXAMPLE: \u003ccode\u003e\ns('FÒÔbàřbaz')-\u003estartsWithAny(['fòô', 'bàř'], false); // true\n\u003c/code\u003e\n\n**Parameters:**\n- `string[] $substrings \u003cp\u003eSubstrings to look for.\u003c/p\u003e`\n- `bool $caseSensitive [optional] \u003cp\u003eWhether or not to enforce case-sensitivity. Default: true\u003c/p\u003e`\n\n**Return:**\n- `bool \u003cp\u003eWhether or not $str starts with $substring.\u003c/p\u003e`\n\n--------\n\n## strip(string|string[] $search): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nRemove one or more strings from the string.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n- `string|string[] $search One or more strings to be removed`\n\n**Return:**\n- `static`\n\n--------\n\n## stripWhitespace(): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nStrip all whitespace characters. This includes tabs and newline characters,\nas well as multibyte whitespace such as the thin space and ideographic space.\n\nEXAMPLE: \u003ccode\u003e\ns('   Ο     συγγραφέας  ')-\u003estripWhitespace(); // 'Οσυγγραφέας'\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `static`\n\n--------\n\n## stripeCssMediaQueries(): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nRemove css media-queries.\n\nEXAMPLE: \u003ccode\u003e\ns('test @media (min-width:660px){ .des-cla #mv-tiles{width:480px} } test ')-\u003estripeCssMediaQueries(); // 'test  test '\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `static`\n\n--------\n\n## stripeEmptyHtmlTags(): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nRemove empty html-tag.\n\nEXAMPLE: \u003ccode\u003e\ns('foo\u003ch1\u003e\u003c/h1\u003ebar')-\u003estripeEmptyHtmlTags(); // 'foobar'\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `static`\n\n--------\n\n## studlyCase(): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nConvert the string to StudlyCase.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `static`\n\n--------\n\n## substr(int $start, int $length): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns the substring beginning at $start with the specified $length.\n\nIt differs from the $this-\u003eutf8::substr() function in that providing a $length of\nnull will return the rest of the string, rather than an empty string.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n- `int $start \u003cp\u003ePosition of the first character to use.\u003c/p\u003e`\n- `int $length [optional] \u003cp\u003eMaximum number of characters used. Default: null\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eObject with its $str being the substring.\u003c/p\u003e`\n\n--------\n\n## substring(int $start, int $length): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturn part of the string.\n\nAlias for substr()\n\nEXAMPLE: \u003ccode\u003e\ns('fòôbàř')-\u003esubstring(2, 3); // 'ôbà'\n\u003c/code\u003e\n\n**Parameters:**\n- `int $start \u003cp\u003eStarting position of the substring.\u003c/p\u003e`\n- `int $length [optional] \u003cp\u003eLength of substring.\u003c/p\u003e`\n\n**Return:**\n- `static`\n\n--------\n\n## substringOf(string $needle, bool $beforeNeedle): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nGets the substring after (or before via \"$beforeNeedle\") the first occurrence of the \"$needle\".\n\nIf no match is found returns new empty Stringy object.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n- `string $needle \u003cp\u003eThe string to look for.\u003c/p\u003e`\n- `bool $beforeNeedle [optional] \u003cp\u003eDefault: false\u003c/p\u003e`\n\n**Return:**\n- `static`\n\n--------\n\n## substringOfIgnoreCase(string $needle, bool $beforeNeedle): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nGets the substring after (or before via \"$beforeNeedle\") the first occurrence of the \"$needle\".\n\nIf no match is found returns new empty Stringy object.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n- `string $needle \u003cp\u003eThe string to look for.\u003c/p\u003e`\n- `bool $beforeNeedle [optional] \u003cp\u003eDefault: false\u003c/p\u003e`\n\n**Return:**\n- `static`\n\n--------\n\n## surround(string $substring): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nSurrounds $str with the given substring.\n\nEXAMPLE: \u003ccode\u003e\ns(' ͜ ')-\u003esurround('ʘ'); // 'ʘ ͜ ʘ'\n\u003c/code\u003e\n\n**Parameters:**\n- `string $substring \u003cp\u003eThe substring to add to both sides.\u003c/P\u003e`\n\n**Return:**\n- `static \u003cp\u003eObject whose $str had the substring both prepended and appended.\u003c/p\u003e`\n\n--------\n\n## swapCase(): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns a case swapped version of the string.\n\nEXAMPLE: \u003ccode\u003e\ns('Ντανιλ')-\u003eswapCase(); // 'νΤΑΝΙΛ'\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `static \u003cp\u003eObject whose $str has each character's case swapped.\u003c/P\u003e`\n\n--------\n\n## tidy(): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns a string with smart quotes, ellipsis characters, and dashes from\nWindows-1252 (commonly used in Word documents) replaced by their ASCII\nequivalents.\n\nEXAMPLE: \u003ccode\u003e\ns('“I see…”')-\u003etidy(); // '\"I see...\"'\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `static \u003cp\u003eObject whose $str has those characters removed.\u003c/p\u003e`\n\n--------\n\n## titleize(string[]|null $ignore, string|null $word_define_chars, string|null $language): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns a trimmed string with the first letter of each word capitalized.\n\nAlso accepts an array, $ignore, allowing you to list words not to be\ncapitalized.\n\nEXAMPLE: \u003ccode\u003e\n$ignore = ['at', 'by', 'for', 'in', 'of', 'on', 'out', 'to', 'the'];\ns('i like to watch television')-\u003etitleize($ignore); // 'I Like to Watch Television'\n\u003c/code\u003e\n\n**Parameters:**\n- `string[]|null $ignore [optional] \u003cp\u003eAn array of words not to capitalize or null.\nDefault: null\u003c/p\u003e`\n- `string|null $word_define_chars [optional] \u003cp\u003eAn string of chars that will be used as whitespace\nseparator === words.\u003c/p\u003e`\n- `string|null $language [optional] \u003cp\u003eLanguage of the source string.\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eObject with a titleized $str.\u003c/p\u003e`\n\n--------\n\n## titleizeForHumans(string[] $ignore): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns a trimmed string in proper title case: Also accepts an array, $ignore, allowing you to list words not to\nbe capitalized.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\nAdapted from John Gruber's script.\n\n**Parameters:**\n- `string[] $ignore \u003cp\u003eAn array of words not to capitalize.\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eObject with a titleized $str\u003c/p\u003e`\n\n--------\n\n## toAscii(string $language, bool $removeUnsupported): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns an ASCII version of the string. A set of non-ASCII characters are\nreplaced with their closest ASCII counterparts, and the rest are removed\nby default. The language or locale of the source string can be supplied\nfor language-specific transliteration in any of the following formats:\nen, en_GB, or en-GB. For example, passing \"de\" results in \"äöü\" mapping\nto \"aeoeue\" rather than \"aou\" as in other languages.\n\nEXAMPLE: \u003ccode\u003e\ns('fòôbàř')-\u003etoAscii(); // 'foobar'\n\u003c/code\u003e\n\n**Parameters:**\n- `ASCII::*_LANGUAGE_CODE $language [optional] \u003cp\u003eLanguage of the source string.\u003c/p\u003e`\n- `bool $removeUnsupported [optional] \u003cp\u003eWhether or not to remove the\nunsupported characters.\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eObject whose $str contains only ASCII characters.\u003c/p\u003e`\n\n--------\n\n## toBoolean(): bool\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns a boolean representation of the given logical string value.\n\nFor example, \u003cstrong\u003e'true', '1', 'on' and 'yes'\u003c/strong\u003e will return true. \u003cstrong\u003e'false', '0',\n'off', and 'no'\u003c/strong\u003e will return false. In all instances, case is ignored.\nFor other numeric strings, their sign will determine the return value.\nIn addition, blank strings consisting of only whitespace will return\nfalse. For all other strings, the return value is a result of a\nboolean cast.\n\nEXAMPLE: \u003ccode\u003e\ns('OFF')-\u003etoBoolean(); // false\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `bool \u003cp\u003eA boolean value for the string.\u003c/p\u003e`\n\n--------\n\n## toLowerCase(bool $tryToKeepStringLength, string|null $lang): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nConverts all characters in the string to lowercase.\n\nEXAMPLE: \u003ccode\u003e\ns('FÒÔBÀŘ')-\u003etoLowerCase(); // 'fòôbàř'\n\u003c/code\u003e\n\n**Parameters:**\n- `bool $tryToKeepStringLength [optional] \u003cp\u003etrue === try to keep the string length: e.g. ẞ -\u003e ß\u003c/p\u003e`\n- `string|null $lang [optional] \u003cp\u003eSet the language for special cases: az, el, lt, tr\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eObject with all characters of $str being lowercase.\u003c/p\u003e`\n\n--------\n\n## toSpaces(int $tabLength): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nConverts each tab in the string to some number of spaces, as defined by\n$tabLength. By default, each tab is converted to 4 consecutive spaces.\n\nEXAMPLE: \u003ccode\u003e\ns(' String speech = \"Hi\"')-\u003etoSpaces(); // '    String speech = \"Hi\"'\n\u003c/code\u003e\n\n**Parameters:**\n- `int $tabLength [optional] \u003cp\u003eNumber of spaces to replace each tab with. Default: 4\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eObject whose $str has had tabs switched to spaces.\u003c/p\u003e`\n\n--------\n\n## toString(): string\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturn Stringy object as string, but you can also use (string) for automatically casting the object into a\nstring.\n\nEXAMPLE: \u003ccode\u003e\ns('fòôbàř')-\u003etoString(); // 'fòôbàř'\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `string`\n\n--------\n\n## toTabs(int $tabLength): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nConverts each occurrence of some consecutive number of spaces, as\ndefined by $tabLength, to a tab. By default, each 4 consecutive spaces\nare converted to a tab.\n\nEXAMPLE: \u003ccode\u003e\ns('    fòô    bàř')-\u003etoTabs(); // '   fòô bàř'\n\u003c/code\u003e\n\n**Parameters:**\n- `int $tabLength [optional] \u003cp\u003eNumber of spaces to replace with a tab. Default: 4\u003c/p\u003e`\n\n**Return:**\n- `static \u003cp\u003eObject whose $str has had spaces switched to tabs.\u003c/p\u003e`\n\n--------\n\n## toTitleCase(): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nConverts the first character of each word in the string to uppercase\nand all other chars to lowercase.\n\nEXAMPLE: \u003ccode\u003e\ns('fòô bàř')-\u003etoTitleCase(); // 'Fòô Bàř'\n\u003c/code\u003e\n\n**Parameters:**\n__nothing__\n\n**Return:**\n- `static \u003cp\u003eObject with all characters of $str being title-cased.\u003c/p\u003e`\n\n--------\n\n## toTransliterate(bool $strict, string $unknown): static\n\u003ca href=\"#voku-php-readme-class-methods\"\u003e↑\u003c/a\u003e\nReturns an ASCII version of the string. A set of non-ASCII characters are\nreplaced with their closest ASCII counterparts, and the rest are removed\nunless instructed otherwise.\n\nEXAMPLE: \u003ccode\u003e\n\u003c/code\u003e\n\n**Parameters:**\n- `bool $strict [optional] \u003cp\u003eUse \"transliterator_transliterate()\" from PHP-Intl | WARNING: bad\nperformance | Defau","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoku%2FStringy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoku%2FStringy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoku%2FStringy/lists"}