PHPackages                             hota1024/php-string - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. hota1024/php-string

ActiveLibrary

hota1024/php-string
===================

PHP String wrapper class and methods

06PHP

Since Jan 31Pushed 8y agoCompare

[ Source](https://github.com/hota1024/PHPString)[ Packagist](https://packagist.org/packages/hota1024/php-string)[ RSS](/packages/hota1024-php-string/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

PHPString
=========

[](#phpstring)

PHP String wrapper class and methods.

Installation
============

[](#installation)

Use composer
------------

[](#use-composer)

Type this command.

`composer require hota1024/php-string`

Can't you use composer?
-----------------------

[](#cant-you-use-composer)

OK.

1. Download this repository.
2. Extract the PHPString-master.zip.
3. You can use `PHPString-master/src/hota1024/String.php`

How to use it?
==============

[](#how-to-use-it)

composer
--------

[](#composer)

```
require_once "path/to/vendor/autoload.php";

$str = new hota1024\Str('Hello world!');
echo $str; # Hello world!
```

Don't use composer
------------------

[](#dont-use-composer)

```
include "path/to/String.php";

$str = new hota1024\Str('Hello world!');
echo $str; # Hello world!
```

Tutorial
========

[](#tutorial)

Step1「Create String object」
---------------------------

[](#step1create-string-object)

```
$string = new hota1024\Str('string value'); # Create string object.
```

Troublesome coding hota1024\\Str?

You can use this code.

`use \hota1024\Str;`

```
use \hota1024\Str;

$string = new hota1024\Str('string value');
```

Step2「Output string value」
--------------------------

[](#step2output-string-value)

Usually use `echo`.

```
$helloworld = new Str('Hello world!');
echo $helloworld; # Hello world!
```

If you wish objective programming code?

You can use this method.

```
$helloworld = new Str('Hello world!');
$helloworld->output(); # Hello world!
```

Step3「String to Array」
----------------------

[](#step3string-to-array)

```
$helloworld = new Str('Hello world!');
var_dump($helloworld->asArray()); # Array ( [0] => H [1] => e [2] => l [3] => l [4] => o [5] => [6] => w [7] => o [8] => r [9] => l [10] => d [11] => ! )
```

Step4「Reverse string」
---------------------

[](#step4reverse-string)

You can make reverse string.

```
$apple = new Str('Apple');
$apple->reverse();
echo $apple; # elppA
```

You wish reversed value?

```
$apple = new Str('Apple');
$rev = $apple->reversed();
echo $rev; # elppA
```

### Step4.1「Write compact code」

[](#step41write-compact-code)

```
$apple = new Str('Apple');
$apple->reverse();
echo $apple; # elppA
```

↓

```
$apple = new Str('Apple');
$apple->reverse()->output(); # elppA
```

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/e97dab83321c7b0b1c6a18e9452552739ec1ddb0b0dc325a81661d40af5381cb?d=identicon)[hota1024](/maintainers/hota1024)

---

Top Contributors

[![hota1024](https://avatars.githubusercontent.com/u/24543982?v=4)](https://github.com/hota1024 "hota1024 (5 commits)")

### Embed Badge

![Health badge](/badges/hota1024-php-string/health.svg)

```
[![Health](https://phpackages.com/badges/hota1024-php-string/health.svg)](https://phpackages.com/packages/hota1024-php-string)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
