Skip to content

Commit 5a58636

Browse files
UPDATE
1 parent 1a130b5 commit 5a58636

File tree

3 files changed

+31
-4
lines changed

3 files changed

+31
-4
lines changed

README.md

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,24 @@ Support Package For Tamedevelopers
2525
* [getBetweenBoxLengthAndWeightInKg](#getBetweenBoxLengthAndWeightInKg)
2626
* [getBetweenBoxLengthAndWeightInCMB](#getBetweenBoxLengthAndWeightInCMB)
2727
* [Str](#str)
28-
* [byteToUnit](#byteToUnit)
29-
* [sizeToBytes](#sizeToBytes)
28+
* [phone](#phone)
29+
* [mask](#mask)
30+
* [html](#html)
31+
* [text](#text)
32+
* [shorten](#shorten)
33+
* [random](#random)
34+
* [formatString](#formatString)
35+
* [encrypt](#encrypt)
36+
* [decrypt](#decrypt)
37+
* [bindings](#bindings)
38+
* [flattenValue](#flattenValue)
39+
* [exceptArray](#exceptArray)
40+
* [replaceFirst](#replaceFirst)
41+
* [replaceLast](#replaceLast)
42+
* [removeKeysFromArray](#removeKeysFromArray)
43+
* [changeKeysFromArray](#changeKeysFromArray)
44+
* [convertArrayKey](#convertArrayKey)
45+
* [convertArrayCase](#convertArrayCase)
3046
* [Zip](#zip)
3147
* [Unzip](#unzip)
3248
* [Zip Download](#zip-download)
@@ -167,7 +183,6 @@ Tame()->byteToUnit(6880);
167183
```
168184

169185
### unitToByte
170-
171186
```
172187
Tame()->unitToByte('24mb');
173188
@@ -300,6 +315,14 @@ Tame()->formatNumberToNearestThousand(1500000);
300315
// Output: "1.5m"
301316
```
302317

318+
## Str
319+
- The Core Class For String Manipulations
320+
- It's helper class can be called, using -- `TameStr()`
321+
322+
```
323+
Tamedevelopers\Support\Str
324+
```
325+
303326
## Zip
304327
- Takes two param as `string`
305328
- [sourcePath] relative path of zip-file

Str.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,9 @@ static public function replaceLast(string $search, string $replace, string $subj
341341
*/
342342
static public function formatString($string, $number = 4, $seperator = '-')
343343
{
344-
return implode($seperator, str_split(self::trim($string), $number));
344+
$string = implode($seperator, str_split(self::trim($string), $number));
345+
346+
return self::replace(' ', '', $string);
345347
}
346348

347349
/**

Tests/str.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@
4242
value: 'lower'
4343
),
4444

45+
Str::formatString('5441298192889133', 3),
46+
4547
Str::snake('Peterso More'),
4648
Str::camel('peterson more'),
4749
Str::studly('peterson more'),

0 commit comments

Comments
 (0)