Skip to content

Commit

Permalink
UPDATE
Browse files Browse the repository at this point in the history
  • Loading branch information
tamedevelopers committed Jan 16, 2025
1 parent 1a130b5 commit 5a58636
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 4 deletions.
29 changes: 26 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,24 @@ Support Package For Tamedevelopers
* [getBetweenBoxLengthAndWeightInKg](#getBetweenBoxLengthAndWeightInKg)
* [getBetweenBoxLengthAndWeightInCMB](#getBetweenBoxLengthAndWeightInCMB)
* [Str](#str)
* [byteToUnit](#byteToUnit)
* [sizeToBytes](#sizeToBytes)
* [phone](#phone)
* [mask](#mask)
* [html](#html)
* [text](#text)
* [shorten](#shorten)
* [random](#random)
* [formatString](#formatString)
* [encrypt](#encrypt)
* [decrypt](#decrypt)
* [bindings](#bindings)
* [flattenValue](#flattenValue)
* [exceptArray](#exceptArray)
* [replaceFirst](#replaceFirst)
* [replaceLast](#replaceLast)
* [removeKeysFromArray](#removeKeysFromArray)
* [changeKeysFromArray](#changeKeysFromArray)
* [convertArrayKey](#convertArrayKey)
* [convertArrayCase](#convertArrayCase)
* [Zip](#zip)
* [Unzip](#unzip)
* [Zip Download](#zip-download)
Expand Down Expand Up @@ -167,7 +183,6 @@ Tame()->byteToUnit(6880);
```

### unitToByte

```
Tame()->unitToByte('24mb');
Expand Down Expand Up @@ -300,6 +315,14 @@ Tame()->formatNumberToNearestThousand(1500000);
// Output: "1.5m"
```

## Str
- The Core Class For String Manipulations
- It's helper class can be called, using -- `TameStr()`

```
Tamedevelopers\Support\Str
```

## Zip
- Takes two param as `string`
- [sourcePath] relative path of zip-file
Expand Down
4 changes: 3 additions & 1 deletion Str.php
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,9 @@ static public function replaceLast(string $search, string $replace, string $subj
*/
static public function formatString($string, $number = 4, $seperator = '-')
{
return implode($seperator, str_split(self::trim($string), $number));
$string = implode($seperator, str_split(self::trim($string), $number));

return self::replace(' ', '', $string);
}

/**
Expand Down
2 changes: 2 additions & 0 deletions Tests/str.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
value: 'lower'
),

Str::formatString('5441298192889133', 3),

Str::snake('Peterso More'),
Str::camel('peterson more'),
Str::studly('peterson more'),
Expand Down

0 comments on commit 5a58636

Please sign in to comment.