Strings Component provide a fluent, object-oriented interface for working with multibyte strings, allowing you to chain multiple string operations together using a more readable syntax compared to traditional PHP strings functions.

Overview

Strings Component

Strings Component provide a fluent, object-oriented interface for working with multibyte string, allowing you to chain multiple string operations together using a more readable syntax compared to traditional PHP strings functions.

Version License Total downloads


Installation

With Composer

composer require atomastic/strings

Resources

Tests

Run tests

./vendor/bin/pest

License

The MIT License (MIT) Copyright (c) 2021 Sergey Romanenko

You might also like...
A lightweight php class for formatting sql statements. Handles automatic indentation and syntax highlighting.

SqlFormatter A lightweight php class for formatting sql statements. It can automatically indent and add line breaks in addition to syntax highlighting

Mobile_Detect is a lightweight PHP class for detecting mobile devices (including tablets). It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.
Mobile_Detect is a lightweight PHP class for detecting mobile devices (including tablets). It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.

Motto: "Every business should have a detection script to detect mobile readers." About Mobile Detect is a lightweight PHP class for detecting mobile d

PHP library to parse urls from string input

Url highlight - PHP library to parse URLs from string input. Works with complex URLs, edge cases and encoded input. Features: Replace URLs in string b

A language detection library for PHP. Detects the language from a given text string.

language-detection Build Status Code Coverage Version Total Downloads Minimum PHP Version License This library can detect the language of a given text

Converts a string to a slug. Includes integrations for Symfony, Silex, Laravel, Zend Framework 2, Twig, Nette and Latte.

cocur/slugify Converts a string into a slug. Developed by Florian Eckerstorfer in Vienna, Europe with the help of many great contributors. Features Re

PHP library to detect and manipulate indentation of strings and files

indentation PHP library to detect and manipulate the indentation of files and strings Installation composer require --dev colinodell/indentation Usage

Convert strings between 13 naming conventions: Snake case, Camel case, Kebab case, Pascal case, Ada case, Train case, Cobol case, Macro case, Upper case, Lower case, Title case, Sentence case and Dot notation.

Case converter Use this library to convert string between: Name Method Output example 🐪 Camel case toCamel() myNameIsBond 👨‍🏫 Pascal case toPascal(

Identifies objects in an image using Machine Learning.

laravel-object-detection This package identifies objects in an image using Machine Learning, TensorFlow and the coco-ssd model. Installation You can i

"結巴"中文分詞:做最好的 PHP 中文分詞、中文斷詞組件。 / "Jieba" (Chinese for "to stutter") Chinese text segmentation: built to be the best PHP Chinese word segmentation module.

jieba-php "結巴"中文分詞:做最好的 PHP 中文分詞、中文斷詞組件,目前翻譯版本為 jieba-0.33 版本,未來再慢慢往上升級,效能也需要再改善,請有興趣的開發者一起加入開發!若想使用 Python 版本請前往 fxsjy/jieba 現在已經可以支援繁體中文!只要將字典切換為 bi

Comments
  • Add license scan report and status

    Add license scan report and status

    Your FOSSA integration was successful! Attached in this PR is a badge and license report to track scan status in your README.

    Below are docs for integrating FOSSA license checks into your CI:

    opened by fossabot 1
  • Moving to PHP 7.4.0

    Moving to PHP 7.4.0

    Define the application minimum supported PHP version 7.4.0

    What's new in PHP 7.4

    https://stitcher.io/blog/new-in-php-74

    PHP Versions Stats - 2020.2 Edition

    https://blog.packagist.com/php-versions-stats-2020-2-edition/

    opened by Awilum 0
Releases(v5.0.1)
  • v5.0.1(Jul 3, 2022)

  • v5.0.0(Jul 3, 2022)

  • v4.4.0(Jun 2, 2022)

    • Added is() method.
    • Added isNot() method.
    • Added isNotHexColor() method.
    • Added isNotAffirmative() method.
    • Added isNotDate() method.
    • Added isNotEmail() method.
    • Added isNotUrl() method.
    • Added isNotEmpty() method.
    • Added isNotAscii() method.
    • Added isNotAlphanumeric() method.
    • Added isNotAlpha() method.
    • Added isNotBlank() method.
    • Added isNotNumeric() method.
    • Added isNotDigit() method.
    • Added isNotLower() method.
    • Added isNotUpper() method.
    • Added isNotHexadecimal() method.
    • Added isNotPrintable() method.
    • Added isNotPunctuation() method.
    • Added isNotSerialized() method.
    • Added isNotJson() method.
    • Added isNotBase64() method.
    • Added isNotSimilar() method.
    • Added isNotEqual() method.
    • Added isNotIP() method.
    • Added isNotMAC() method.
    • Added isNotHTML() method.
    • Added isNotInteger() method.
    • Added isNotFloat() method.
    • Added isNotNull() method.
    • Added isNotBoolean() method.
    • Added isNotTrue() method.
    • Added isNotFalse() method.
    • Added isNotUuid() method.
    • Added when() method.
    • Added unless() method.
    • Added whenContains() method.
    • Added whenEqual() method.
    • Added whenIs() method.
    • Added whenIsAscii() method.
    • Added whenStartsWith() method.
    • Added whenIsUuid() method.
    • Added wrap() method.
    • Added dump() method.
    • Added dd() method.
    • Added newLine() method.
    Source code(tar.gz)
    Source code(zip)
  • v4.2.0(Jan 1, 2022)

  • v4.1.0(Dec 30, 2021)

  • v4.0.0(Dec 22, 2021)

  • v3.0.2(Apr 13, 2021)

  • v3.0.1(Feb 19, 2021)

  • v3.0.0(Feb 18, 2021)

    • Moving to PHP 7.4.0
    • add echo() method
    • add format() method
    • add crc32() method
    • add md5() method
    • add sha1() method
    • add sha256() method
    • add base64Decode() method
    • add base64Encode() method
    Source code(tar.gz)
    Source code(zip)
  • v2.5.0(Jan 29, 2021)

  • v2.4.0(Dec 5, 2020)

    • add copy() method.

    • add ability to extend Strings class with Macros.

      use Atomastic\Strings\Strings;
      use Atomastic\Macroable\Macroable;
      
      Strings::macro('concatenate', function(string $string) {
          return $this->toString() . $string;
      });
      
      $strings = new Strings('Hello');
      
      echo $strings->concatenate(' World'));
      
    Source code(tar.gz)
    Source code(zip)
  • v2.3.0(Nov 29, 2020)

    • add replace() method.
    • add pipe() method.
    • add chars() method.
    • add getIterator() method.
    • add offsetExists() offsetGet() offsetSet() offsetExists() methods.
    • implement interface: ArrayAccess, Countable, IteratorAggregate.
    • improve methods trim() trimLeft() trimRight()
    • improve tests for replaceArray() method.
    • improve tests workflow
    • general code refactoring
    Source code(tar.gz)
    Source code(zip)
  • v2.2.0(Nov 24, 2020)

    • fix limit() method if string length is lower or equals to provided limit.
    • fix studly() method.
    • fix issue with encoding on new Strings object creation.
    • remove memory cache for words.
    • add tests for isSimilar() method.
    • improve tests for isBase64() method.
    • improve tests for move() method.
    • improve tests for beforeLast() method.
    • improve tests for afterLast() method.
    • improve tests for replaceFirst() method.
    • improve tests for between() method.
    • improve tests for indexOfLast() method.
    • improve tests for indexOf() method.
    • improve tests for random() method.
    • improve tests for replaceLast() method.
    • improve tests for isSerialized() method.
    • improve tests for hash() method.
    • improve tests for studly() method.
    • improve tests for __costruct() method.
    • improve tests workflow.
    Source code(tar.gz)
    Source code(zip)
  • v2.1.0(Nov 5, 2020)

    • add isIP method.
    • add isMAC method.
    • add isHTML method.
    • add isBoolean method.
    • add isTrue method.
    • add isFalse method.
    • improve tests for toBoolean method.
    Source code(tar.gz)
    Source code(zip)
  • v2.0.0(Oct 28, 2020)

    • simplify length() method.
    • add lines() method.
    • add words() method.
    • add charsFrequency() method.
    • add wordsFrequency() method.
    • add wordsSortDesc() and wordsSortAsc() methods.
    • add replaceDashes() method.
    • add replacePunctuations() method.
    • add getEncoding() and setEncoding() methods.
    • add replaceNonAlpha() method and update replaceNonAlphanumeric() method.
    • add replaceNonAlphanumeric() method.
    • add isUrl() method.
    • add isEmail() method.
    • improve stripSpaces() method.
    • rewrite method logic and rename countWords() to wordsCount()
    • rename method words() to wordsLimit() and improve tests for this method.
    • update tests for segments() method.

    BREAKING CHANGES

    • USE METHOD wordsCount() INSTEAD OF countWords()
    • USE wordsLimit() INSTEAD OF words()
    Source code(tar.gz)
    Source code(zip)
  • v1.0.0(Sep 25, 2020)

Owner
ATOMASTIC
A set of decoupled and reusable PHP building blocks for kickass Web Applications.
ATOMASTIC
A PHP string manipulation library with multibyte support. Compatible with PHP 5.4+, PHP 7+, and HHVM.

A PHP string manipulation library with multibyte support. Compatible with PHP 5.4+, PHP 7+, and HHVM. s('string')->toTitleCase()->ensureRight('y') ==

Daniel St. Jules 2.5k Dec 28, 2022
A PHP string manipulation library with multibyte support

A PHP string manipulation library with multibyte support. Compatible with PHP 5.4+, PHP 7+, and HHVM. s('string')->toTitleCase()->ensureRight('y') ==

Daniel St. Jules 2.5k Jan 3, 2023
:accept: Stringy - A PHP string manipulation library with multibyte support, performance optimized

?? Stringy A PHP string manipulation library with multibyte support. Compatible with PHP 7+ 100% compatible with the original "Stringy" library, but t

Lars Moelleken 144 Dec 12, 2022
Multibyte strings as objects

Opis String Multibyte strings Opis String is a tiny library that allows you to work with multibyte encoded strings in an object-oriented manner. The l

Opis 58 Oct 6, 2022
Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way.

String Component The String component provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a un

Symfony 1.3k Dec 29, 2022
🉑 Portable UTF-8 library - performance optimized (unicode) string functions for php.

?? Portable UTF-8 Description It is written in PHP (PHP 7+) and can work without "mbstring", "iconv" or any other extra encoding php-extension on your

Lars Moelleken 474 Dec 22, 2022
🔡 Portable ASCII library - performance optimized (ascii) string functions for php.

?? Portable ASCII Description It is written in PHP (PHP 7+) and can work without "mbstring", "iconv" or any other extra encoding php-extension on your

Lars Moelleken 380 Jan 6, 2023
A sane interface for php's built in preg_* functions

Making regex great again Php's built in preg_* functions require some odd patterns like passing variables by reference and treating false or null valu

Spatie 1.1k Jan 4, 2023
highlight.php is a server-side syntax highlighter written in PHP that currently supports 185 languages

highlight.php is a server-side syntax highlighter written in PHP that currently supports 185 languages. It's a port of highlight.js by Ivan Sagalaev that makes full use of the language and style definitions of the original JavaScript project.

Geert Bergman 633 Dec 27, 2022
A lightweight php class for formatting sql statements. Handles automatic indentation and syntax highlighting.

SqlFormatter A lightweight php class for formatting sql statements. It can automatically indent and add line breaks in addition to syntax highlighting

Jeremy Dorn 3.9k Jan 1, 2023