mirror of
https://github.com/danielstjules/Stringy.git
synced 2025-08-11 15:54:04 +02:00
Add changelog, make few small doc corrections
This commit is contained in:
3
CHANGELOG.md
Normal file
3
CHANGELOG.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
### 1.0.0-rc.1 (2013-07-28)
|
||||||
|
|
||||||
|
* Release candidate
|
18
README.md
18
README.md
@@ -6,8 +6,6 @@ A PHP library with a variety of string manipulation functions with multibyte sup
|
|||||||
[](https://packagist.org/packages/danielstjules/stringy)
|
[](https://packagist.org/packages/danielstjules/stringy)
|
||||||
[](https://packagist.org/packages/danielstjules/stringy)
|
[](https://packagist.org/packages/danielstjules/stringy)
|
||||||
|
|
||||||
Note: The methods listed below are subject to change until we reach a 1.0.0 release.
|
|
||||||
|
|
||||||
* [Requiring/Loading](#requiringloading)
|
* [Requiring/Loading](#requiringloading)
|
||||||
* [OO and Procedural](#oo-and-procedural)
|
* [OO and Procedural](#oo-and-procedural)
|
||||||
* [Methods](#methods)
|
* [Methods](#methods)
|
||||||
@@ -175,7 +173,7 @@ Returns true if $haystack contains $needle, false otherwise.
|
|||||||
|
|
||||||
```php
|
```php
|
||||||
S::create('Ο συγγραφέας είπε', 'UTF-8')->contains('συγγραφέας');
|
S::create('Ο συγγραφέας είπε', 'UTF-8')->contains('συγγραφέας');
|
||||||
S::contains('Ο συγγραφέας είπε', 'συγγραφέας', 'UTF-8') // true
|
S::contains('Ο συγγραφέας είπε', 'συγγραφέας', 'UTF-8'); // true
|
||||||
```
|
```
|
||||||
|
|
||||||
#### count
|
#### count
|
||||||
@@ -189,7 +187,7 @@ mb_substr_count()
|
|||||||
|
|
||||||
```php
|
```php
|
||||||
S::create('Ο συγγραφέας είπε', 'UTF-8')->count('α');
|
S::create('Ο συγγραφέας είπε', 'UTF-8')->count('α');
|
||||||
S::count('Ο συγγραφέας είπε', 'α', 'UTF-8') // 2
|
S::count('Ο συγγραφέας είπε', 'α', 'UTF-8'); // 2
|
||||||
```
|
```
|
||||||
|
|
||||||
#### create
|
#### create
|
||||||
@@ -542,7 +540,7 @@ Replaces all occurrences of $search with $replace in $str.
|
|||||||
|
|
||||||
```php
|
```php
|
||||||
S::create('fòô bàř fòô bàř', 'UTF-8')->replace('fòô ', '');
|
S::create('fòô bàř fòô bàř', 'UTF-8')->replace('fòô ', '');
|
||||||
S::replace('fòô bàř fòô bàř', 'fòô ', '', 'UTF-8') // 'bàř bàř'
|
S::replace('fòô bàř fòô bàř', 'fòô ', '', 'UTF-8'); // 'bàř bàř'
|
||||||
```
|
```
|
||||||
|
|
||||||
#### reverse
|
#### reverse
|
||||||
@@ -585,7 +583,7 @@ in a string.
|
|||||||
|
|
||||||
```php
|
```php
|
||||||
S::create('fòô bàř', 'UTF-8')->shuffle();
|
S::create('fòô bàř', 'UTF-8')->shuffle();
|
||||||
S::shuffle('fòô bàř', 'UTF-8') // 'àôřb òf'
|
S::shuffle('fòô bàř', 'UTF-8'); // 'àôřb òf'
|
||||||
```
|
```
|
||||||
|
|
||||||
#### slugify
|
#### slugify
|
||||||
@@ -601,7 +599,7 @@ dashes. The string is also converted to lowercase.
|
|||||||
|
|
||||||
```php
|
```php
|
||||||
S::create('Using strings like fòô bàř')->slugify();
|
S::create('Using strings like fòô bàř')->slugify();
|
||||||
S::slugify('Using strings like fòô bàř') // 'using-strings-like-foo-bar'
|
S::slugify('Using strings like fòô bàř'); // 'using-strings-like-foo-bar'
|
||||||
```
|
```
|
||||||
|
|
||||||
#### standardize
|
#### standardize
|
||||||
@@ -716,7 +714,7 @@ $tabLength. By default, each tab is converted to 4 consecutive spaces.
|
|||||||
|
|
||||||
```php
|
```php
|
||||||
S::create(' String speech = "Hi"')->toSpaces();
|
S::create(' String speech = "Hi"')->toSpaces();
|
||||||
S::toSpaces(' String speech = "Hi"') // ' String speech = "Hi"'
|
S::toSpaces(' String speech = "Hi"'); // ' String speech = "Hi"'
|
||||||
```
|
```
|
||||||
|
|
||||||
#### toTabs
|
#### toTabs
|
||||||
@@ -731,7 +729,7 @@ converted to a tab.
|
|||||||
|
|
||||||
```php
|
```php
|
||||||
S::create(' fòô bàř')->toTabs();
|
S::create(' fòô bàř')->toTabs();
|
||||||
S::toTabs(' fòô bàř') // ' fòô bàř'
|
S::toTabs(' fòô bàř'); // ' fòô bàř'
|
||||||
```
|
```
|
||||||
|
|
||||||
#### trim
|
#### trim
|
||||||
@@ -744,7 +742,7 @@ Trims $str. An alias for PHP's trim() function.
|
|||||||
|
|
||||||
```php
|
```php
|
||||||
S::create('fòô bàř', 'UTF-8')->trim();
|
S::create('fòô bàř', 'UTF-8')->trim();
|
||||||
S::trim(' fòô bàř ') // 'fòô bàř'
|
S::trim(' fòô bàř '); // 'fòô bàř'
|
||||||
```
|
```
|
||||||
|
|
||||||
#### truncate
|
#### truncate
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"name": "danielstjules/stringy",
|
"name": "danielstjules/stringy",
|
||||||
"description": "A small string manipulation library with multibyte support",
|
"description": "A string manipulation library with multibyte support",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"multibyte", "string", "manipulation", "utility", "methods", "utf-8",
|
"multibyte", "string", "manipulation", "utility", "methods", "utf-8",
|
||||||
"helpers", "utils"
|
"helpers", "utils", "utf"
|
||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"authors": [
|
"authors": [
|
||||||
|
Reference in New Issue
Block a user