strings icon indicating copy to clipboard operation
strings copied to clipboard

String helper methods and an inflector

Results 7 strings issues
Sort by recently updated
recently updated
newest added

You can trigger a rebase of this PR by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- Dependabot commands and options You can trigger Dependabot actions by commenting...

dependencies
php

### What steps will reproduce the problem? Pluralize a word ending in "ion", e.g. ``` $plural = $inflector->toPlural('nation'); ``` ### What is the expected result? ``` $plural === 'nations'; ```...

type:bug

We have introduced https://github.com/yiisoft/strings/blob/master/src/CombinedRegexp.php that helps with a loop of regexps. There are some places to apply `CombinedRegexp`: - https://github.com/yiisoft/strings/blob/63aef52b3d8568af153bddc1f526994474d96074/src/Inflector.php#L439 - https://github.com/yiisoft/strings/blob/63aef52b3d8568af153bddc1f526994474d96074/src/Inflector.php#L418

type:enhancement
status:under discussion

What's the purpose to support `null` value in [startsWith](https://github.com/yiisoft/strings/blob/6e816f51b323ecfcb3b4a55f22cee7b4f0d4ab05/src/StringHelper.php#L154)?

status:ready for adoption

This allow remove check type into this methods. ```php NumericHelper::toOrdinal(float|int|string $value); NumericHelper::normalize(bool|float|int|string $value); ```

type:enhancement

I propose to add class `StringObject`. Then it will be possible to manipulate strings in object-oriented style: ```php $baseWord = new StringObject('soft', 'UTF-8'); $projectName = $baseWord ->preprend('yii') ->addWord('project') ->upperCaseEveryWord(); $projectNameWordsCount...

status:ready for adoption
type:feature

I do not have concept to implement this thing, but I think that it can be extension to asText formatter method. First, there are a few methods of word wrapping:...

type:enhancement
status:ready for adoption