The Hoa\Ustring library.

Overview

Hoa


Build status Code coverage Packagist License

Hoa is a modular, extensible and structured set of PHP libraries.
Moreover, Hoa aims at being a bridge between industrial and research worlds.

Hoa\Ustring

Help on IRC Help on Gitter Documentation Board

This library allows to manipulate UTF-8 strings easily with some search algorithms.

Learn more.

Installation

With Composer, to include this library into your dependencies, you need to require hoa/ustring:

$ composer require hoa/ustring '~4.0'

For more installation procedures, please read the Source page.

Testing

Before running the test suites, the development dependencies must be installed:

$ composer install

Then, to run all the test suites:

$ vendor/bin/hoa test:run

For more information, please read the contributor guide.

Quick usage

We propose a quick overview of two usages: manipulate UTF-8 strings and one search algorithm.

Natural UTF-8 strings manipulation

The Hoa\Ustring\Ustring class allows to manipulate easily UTF-8 strings in a very natural way. This class implements the \ArrayAccess, \Countable and \IteratorAggregate interfaces. We will use the following examples:

$french   = new Hoa\Ustring\Ustring('Je t\'aime');
$arabic   = new Hoa\Ustring\Ustring('أحبك');
$japanese = new Hoa\Ustring\Ustring('私はあなたを愛して');

To get the first character, we will do:

var_dump(
    $french[0],  // string(1) "J"
    $arabic[0],  // string(2) "أ"
    $japanese[0] // string(3) "私"
);

And to get the last character, we will do [-1]. It supports unbounded (and modulo) indexes.

We note that it cares about text direction. Look at $arabic[0], it returns أ and not ك. To get the direction, we can use the Hoa\Ustring\Ustring::getDirection method (which call the Hoa\Ustring\Ustring::getCharDirection static method), it returns either Hoa\Ustring\Ustring::LTR (0) or Hoa\Ustring\Ustring::RTL (1):

var_dump(
    $french->getDirection(),  // int(0)
    $arabic->getDirection(),  // int(1)
    $japanese->getDirection() // int(0)
);

Text direction is also important for the append, prepend, pad… methods on Hoa\Ustring\Ustring for example.

To get the length of a string, we can use the count function:

var_dump(
    count($french),  // int(9)
    count($arabic),  // int(4)
    count($japanese) // int(9)
);

We are also able to iterate over the string:

foreach ($arabic as $letter) {
    var_dump($letter);
}

/**
 * Will output:
 *     string(2) "أ"
 *     string(2) "ح"
 *     string(2) "ب"
 *     string(2) "ك"
 */

Again, text direction is useful here. For $arabic, the iteration is done from right to left.

Some static methods are helpful, such as fromCode, toCode or isUtf8 on Hoa\Ustring\Ustring:

var_dump(
    Hoa\Ustring\Ustring::fromCode(0x1a9), // string(2) "Ʃ"
    Hoa\Ustring\Ustring::toCode('Ʃ'),     // int(425) == 0x1a9
    Hoa\Ustring\Ustring::isUtf8('Ʃ')      // bool(true)
);

We can also transform any text into ASCII:

$emoji = new Hoa\Ustring\Ustring('I ❤ Unicode');
$maths = new Hoa\Ustring\Ustring('∀ i ∈ ℕ');

echo
    $emoji->toAscii(), "\n",
    $maths->toAscii(), "\n";

/**
 * Will output:
 *     I (heavy black heart) Unicode
 *     (for all) i (element of) N
 */

Search algorithm

The Hoa\Ustring\Search implements search algorithms on strings.

For example, the Hoa\Ustring\Search::approximated method make a search by approximated patterns (with k differences based upon the principle diagonal monotony). If we search the word GATAA in CAGATAAGAGAA with 1 difference, we will do:

$search = Hoa\Ustring\Search::approximated(
    $haystack = 'CAGATAAGAGAA',
    $needle   = 'GATAA',
    $k        = 1
);
$solutions = array();

foreach ($search as $pos) {
    $solutions[] = substr($haystack, $pos['i'], $pos['l']);
}

We will found AGATA, GATAA, ATAAG and GAGAA.

The result is not very handy but the algorithm is much optimized and found many applications.

Documentation

The hack book of Hoa\Ustring contains detailed information about how to use this library and how it works.

To generate the documentation locally, execute the following commands:

$ composer require --dev hoa/devtools
$ vendor/bin/hoa devtools:documentation --open

More documentation can be found on the project's website: hoa-project.net.

Getting help

There are mainly two ways to get help:

Contribution

Do you want to contribute? Thanks! A detailed contributor guide explains everything you need to know.

License

Hoa is under the New BSD License (BSD-3-Clause). Please, see LICENSE for details.

Comments
  • Add the `getCharWidth` and `isCharPrintable` methods

    Add the `getCharWidth` and `isCharPrintable` methods

    Fix #8. Address https://github.com/hoaproject/Console/issues/17. Address https://github.com/hoaproject/Console/issues/16.

    getCharWidth

    Sooo… it has been a long time before fixing this issue but it was not easy :-]. mb_strwidth does not support C0/C1 control characters from the terminal and the PHP implementation is quite strange (apparently, it mainly supports Japanese, don't know why, the documentation is wrong… well, I didn't dig more).

    I propose to keep the String::getWidth method because it uses mb_strwidth. However, to test the width of a specific character, I propose to introduce the String::getCharWidth. This static method takes care of C0/C1 sequence character. The algorithm is based on http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c by @mgkuhn (thanks @nicolas-grekas for the link!). I forgot this link but a comment on Reddit reminds me it :-p.

    Testing this algorithm was not simple. I used a tool called Pex, by Nikolai Tillmann to help me. The resulting test data are small but relevant. Maybe we should add more data to test the $combining table?

    isCharPrintable

    Then, I was able to easily introduce the isCharPrintable static method. In the case of https://github.com/hoaproject/Console/issues/17, the DELETE character is 0x7f. According to our tests, we can't print this character, which is correct. Finally :-].

    I am asking a review from @nicolas-grekas and @hoaproject/hoackers :-).

    bug enhancement 
    opened by Hywan 11
  • Transliterator support

    Transliterator support

    1. Add transliterator.
    2. toAscii then uses transliterator instead of normalizer when available.
    3. Pure awesomeness.

    See the tests:

    | Original | Asciied | | --- | --- | | Un été brûlant sur la côte | Un ete brulant sur la cote | | Αυτή είναι μια δοκιμή |  Aute einai mia dokime | | أحبك | ahbk | | キャンパス | kyanpasu | | биологическом | biologiceskom | | मोनिच |  monica | | أحبك 😀 |  ahbk (grinning face) | | ∀ i ∈ ℕ |  (for all) i (element of) N |

    Symbols support are just awesome I think :-p.

    Asking a review from @osaris and @jubianchi, and the thought of @shine-neko!

    enhancement 
    opened by Hywan 10
  • Conflict with PHP7

    Conflict with PHP7

    Hello :smile:,

    PHP7 has a new keyword: string. To bad for us, it makes Hoa\String crashes because we can no longer use this keyword.

    Here, we need to rename this library. I suggest Hoa\Ustring, like ustring (“unicode strings”). This would be pretty logical.

    How to migrate then, without breaking code? It will break the code, for sure, but it will create a new library. Here is my proposal, probably not perfect, feel free to comment:

    1. [x] create Hoa\Ustring,
    2. [x] import Hoa\String into Hoa\Ustring and update the code, documentation, tests and README.md,
    3. [x] rename the Git repository on git.hoa-project.net, github.com/hoaproject and pikacode.com/hoaproject from String.git to Ustring.git (this way we don't lost stargazers & co.),
    4. [x] update Packagist to point to github.com/hoaproject/Ustring,
    5. [x] update composer.json library's name to hoa/ustring (here, we will break stuff and lost Packagist numbers),
    6. [x] update all dependencies on Hoa,
    7. [x] update the website,
    8. [x] create Hoa\String, extending Hoa\Ustring but deprecated,
    9. [x] update Hoa\Core\Consistency::isKeyword (with other libraries, like Hoa\Realdom).

    We could keep the String.git repository for some time, I don't know. As far as I know, nobody requires hoa/string directly, but only through others libraries.

    Thoughts @hoaproject/hoackers?

    bug 
    opened by Hywan 9
  • Undefined variable: bytes in String.php line 974

    Undefined variable: bytes in String.php line 974

    String::toCode() is broken when passing a non-breaking space 0xa0 with the following error:

    [Symfony\Component\Debug\Exception\ContextErrorException]                                       
      Notice: Undefined variable: bytes in /var/www/phraseanet/vendor/hoa/string/String.php line 974  
    
    
    
    Exception trace:
     () at /var/www/phraseanet/vendor/hoa/string/String.php:974
     Symfony\Component\Debug\ErrorHandler->handle() at /var/www/phraseanet/vendor/hoa/string/String.php:973
     Hoa\String\String::toCode() at /var/www/phraseanet/vendor/hoa/regex/Visitor/Isotropic.php:172
     Hoa\Regex\Visitor\Isotropic->visit() at /var/www/phraseanet/vendor/hoa/compiler/Llk/TreeNode.php:336
     Hoa\Compiler\Llk\TreeNode->accept() at /var/www/phraseanet/vendor/hoa/regex/Visitor/Isotropic.php:161
     Hoa\Regex\Visitor\Isotropic->visit() at /var/www/phraseanet/vendor/hoa/compiler/Llk/TreeNode.php:336
     Hoa\Compiler\Llk\TreeNode->accept() at /var/www/phraseanet/vendor/hoa/regex/Visitor/Isotropic.php:97
     Hoa\Regex\Visitor\Isotropic->visit() at /var/www/phraseanet/vendor/hoa/compiler/Llk/Sampler/Sampler.php:203
     Hoa\Compiler\Llk\Sampler\Sampler->generateToken() at /var/www/phraseanet/vendor/hoa/compiler/Llk/Sampler/BoundedExhaustive.php:184
     Hoa\Compiler\Llk\Sampler\BoundedExhaustive->valid() at /var/www/phraseanet/lib/Alchemy/Phrasea/Command/SearchEngine/Debug/QuerySampleCommand.php:63
    ...
    

    Edit: fixed line 973 to 974 (was due to some editing).

    bug 
    opened by mdarse 8
  • Make iconv requirement optional

    Make iconv requirement optional

    I'm currently looking at integrating hoa/console into the webmozart/console library. However, hoa/console depends on hoa/ustring, which in turns requires the iconv extension to be installed.

    Does this really have to be a hard requirement instead of a suggest? As far as I saw, iconv is only needed for Ustring::transcode(). You could check whether the function is available there, throw an exception otherwise and add iconv to "suggest" instead. I'd be happy about reduced dependencies.

    enhancement difficulty: casual 
    opened by webmozart 7
  • `ext/iconv` is suggested, no longer required

    `ext/iconv` is suggested, no longer required

    Fix #31.

    First, this patch introduces and testes the checkIconv static method that checks whether the ext/iconv extension is available or not.

    Second, this method is used in the Ustring::transcode static method to test whether this extension is available. If not, then an exception is thrown.

    Finally, because this is only for one method and to allow third implementation to be used instead of the official ext/iconv extension, this extension is now suggested instead of required in the composer.json file. It removes one (strong) dependency to projects using hoa/ustring if they are sure to not use Hoa\Ustring::transcode.

    enhancement difficulty: casual 
    opened by Hywan 2
  • Detect non-printable/printable characters

    Detect non-printable/printable characters

    Would be specifically useful for https://github.com/hoaproject/Console/issues/16, https://github.com/hoaproject/Console/issues/17 and https://github.com/hoaproject/Console/issues/18.

    enhancement 
    opened by Hywan 2
  • Usage of mb string

    Usage of mb string

    Hi,

    I was looking at String class and noticed mb_string usage.

    Recently there is a discussion on twitter https://twitter.com/SaraMG/status/494185819369132032

    May be you will be also interested.

    Thanks

    enhancement 
    opened by harikt 2
  • Remove strong dependency check for mbstring

    Remove strong dependency check for mbstring

    The mbstring functions that are used here can be implemented directly in PHP, (see https://github.com/nicolas-grekas/Patchwork-UTF8/blob/master/class/Patchwork/PHP/Shim/Mbstring.php ) but checking for the extension directly excludes this kind of compatibility implementations from working.

    opened by nicolas-grekas 1
  • Dependabot can't resolve your PHP dependency files

    Dependabot can't resolve your PHP dependency files

    Dependabot can't resolve your PHP dependency files.

    As a result, Dependabot couldn't update your dependencies.

    The error Dependabot encountered was:

    Your requirements could not be resolved to an installable set of packages.
      Problem 1
        - Root composer.json requires hoa/exception dev-master -> satisfiable by hoa/exception[dev-master].
        - hoa/exception dev-master requires hoa/event dev-master -> found hoa/event[dev-master, 2.x-dev (alias of dev-master)] but it does not match your minimum-stability.
      Problem 2
        - Root composer.json requires hoa/test dev-master -> satisfiable by hoa/test[dev-master].
        - hoa/test dev-master requires hoa/cli dev-master -> found hoa/cli[dev-master, 3.x-dev (alias of dev-master)] but it does not match your minimum-stability.
    
    

    If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

    View the update logs.

    opened by dependabot-preview[bot] 0
  • Dependabot can't resolve your PHP dependency files

    Dependabot can't resolve your PHP dependency files

    Dependabot can't resolve your PHP dependency files.

    As a result, Dependabot couldn't update your dependencies.

    The error Dependabot encountered was:

    Your requirements could not be resolved to an installable set of packages.
      Problem 1
        - Installation request for hoa/exception dev-master -> satisfiable by hoa/exception[dev-master].
        - hoa/exception dev-master requires hoa/event dev-master -> satisfiable by hoa/event[dev-master] but these conflict with your requirements or minimum-stability.
      Problem 2
        - Installation request for hoa/test dev-master -> satisfiable by hoa/test[dev-master].
        - hoa/test dev-master requires hoa/cli dev-master -> satisfiable by hoa/cli[dev-master] but these conflict with your requirements or minimum-stability.
    
    

    If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

    You can mention @dependabot in the comments below to contact the Dependabot team.

    opened by dependabot-preview[bot] 0
  • Upgrade to GitHub-native Dependabot

    Upgrade to GitHub-native Dependabot

    Dependabot Preview will be shut down on August 3rd, 2021. In order to keep getting Dependabot updates, please merge this PR and migrate to GitHub-native Dependabot before then.

    Dependabot has been fully integrated into GitHub, so you no longer have to install and manage a separate app. This pull request migrates your configuration from Dependabot.com to a config file, using the new syntax. When merged, we'll swap out dependabot-preview (me) for a new dependabot app, and you'll be all set!

    With this change, you'll now use the Dependabot page in GitHub, rather than the Dependabot dashboard, to monitor your version updates, and you'll configure Dependabot through the new config file rather than a UI.

    If you've got any questions or feedback for us, please let us know by creating an issue in the dependabot/dependabot-core repository.

    Learn more about migrating to GitHub-native Dependabot

    Please note that regular @dependabot commands do not work on this pull request.

    dependencies 
    opened by dependabot-preview[bot] 1
  • Dependabot can't resolve your PHP dependency files

    Dependabot can't resolve your PHP dependency files

    Dependabot can't resolve your PHP dependency files.

    As a result, Dependabot couldn't update your dependencies.

    The error Dependabot encountered was:

    Your requirements could not be resolved to an installable set of packages.
      Problem 1
        - Root composer.json requires hoa/exception dev-master -> satisfiable by hoa/exception[dev-master].
        - hoa/exception dev-master requires hoa/event dev-master -> found hoa/event[dev-master, 2.x-dev (alias of dev-master)] but it does not match your minimum-stability.
      Problem 2
        - Root composer.json requires hoa/test dev-master -> satisfiable by hoa/test[dev-master].
        - hoa/test dev-master requires hoa/cli dev-master -> found hoa/cli[dev-master, 3.x-dev (alias of dev-master)] but it does not match your minimum-stability.
    

    If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

    View the update logs.

    opened by dependabot-preview[bot] 0
  • Ci

    Ci

    Sequel to #40

    I've created this PR here instead of on @vonglasow repository because I'm facing strange behavior on Travis and prefer to let PR hook of the original repository to trigger Travis.

    in progress 
    opened by Pierozi 17
  • `replace(…, '_')` is considered as a callable

    `replace(…, '_')` is considered as a callable

    Ustring::replace supports 2 forms for the second argument: Either a string, or a callable. If it is a string, then preg_replace is used, else preg_replace_callback.

    The string '_' is considered as a callable, because is_callable('_') returns true. Why? Because the function _ exists!

    It is a bug. It's better to test if it is a Closure.

    cc @hoaproject/hoackers, any volunteers?

    bug difficulty: casual 
    opened by Hywan 0
Releases(4.17.01.16)
  • 4.17.01.16(Jan 16, 2017)

    • Quality: Happy new year! (Alexis von Glasow, 2017-01-12T14:01:18+01:00)
    • Test: Add the Decorrelated interface. (Ivan Enderlin, 2016-10-25T07:58:13+02:00)
    • Documentation: New README.md file. (Ivan Enderlin, 2016-10-18T15:10:49+02:00)
    • Documentation: Update support properties. (Ivan Enderlin, 2016-10-11T08:45:51+02:00)
    Source code(tar.gz)
    Source code(zip)
  • 4.16.01.11(Jan 11, 2016)

    • Quality: Drop PHP5.4. (Ivan Enderlin, 2016-01-11T09:15:27+01:00)
    • Quality: Run devtools:cs. (Ivan Enderlin, 2016-01-09T09:11:00+01:00)
    • Core: Remove Hoa\Core. (Ivan Enderlin, 2016-01-09T08:27:47+01:00)
    • Consistency: Use Hoa\Consistency. (Ivan Enderlin, 2015-12-08T22:11:40+01:00)
    • Exception: Use Hoa\Exception. (Ivan Enderlin, 2015-11-20T13:19:42+01:00)
    Source code(tar.gz)
    Source code(zip)
  • 3.15.11.09(Nov 9, 2015)

    • Fixed leftover typos (string -> ustring) (David Thalmann, 2015-09-08T14:45:12+02:00)
    • Add a .gitignore file. (Stéphane HULARD, 2015-08-03T11:49:32+02:00)
    Source code(tar.gz)
    Source code(zip)
  • 3.15.08.03(Aug 3, 2015)

    • ext/iconv is suggested, no longer required. (Ivan Enderlin, 2015-08-03T07:06:46+02:00)
    • Fix CS. (Ivan Enderlin, 2015-08-03T07:05:10+02:00)
    • Test ext/mbstring availability globally. (Ivan Enderlin, 2015-08-03T07:04:30+02:00)
    Source code(tar.gz)
    Source code(zip)
  • 3.15.07.28(Jul 28, 2015)

    • Fix CS. (Ivan Enderlin, 2015-07-28T14:13:48+02:00)
    • Fix the CHANGELOG. (Ivan Enderlin, 2015-07-28T14:13:27+02:00)
    • Prepare 3.15.05.29. (Ivan Enderlin, 2015-05-29T15:36:54+02:00)
    Source code(tar.gz)
    Source code(zip)
  • 3.15.05.29(May 29, 2015)

    • Update installation section. (Ivan Enderlin, 2015-05-29T14:13:22+02:00)
    • Rename Hoa\String to Hoa\Ustring. (Ivan Enderlin, 2015-05-29T12:24:23+02:00)
    • Move to PSR-1 and PSR-2. (Ivan Enderlin, 2015-05-18T09:49:37+02:00)
    Source code(tar.gz)
    Source code(zip)
  • 2.15.03.25(Mar 25, 2015)

    • toCode supports invalid UTF-8 character. (Ivan Enderlin, 2015-03-25T08:52:52+01:00)
    • Fix a typo in an exception message. (bureX, 2015-01-27T01:41:08+01:00)
    Source code(tar.gz)
    Source code(zip)
  • 2.15.02.19(Feb 19, 2015)

    • Add the CHANGELOG.md file. (Ivan Enderlin, 2015-02-19T09:11:32+01:00)
    • Add require-dev with hoa/test. (Ivan Enderlin, 2015-01-29T14:55:20+01:00)
    • Add hoa string:fromcode and hoa string:tocode. (Ivan Enderlin, 2015-01-23T22:29:55+01:00)
    • Translate the documentation in English. (Ivan Enderlin, 2015-01-23T19:27:04+01:00)
    • Add examples, present new features and update links in the documentation. (Ivan Enderlin, 2015-01-23T19:27:00+01:00)
    • Implement the getCharWidth method. (Ivan Enderlin, 2015-01-07T11:00:06+01:00)
    • Accept other intl implementations. (Ivan Enderlin, 2015-01-06T13:42:20+01:00)
    • Remove a useless test. (Ivan Enderlin, 2015-01-06T11:24:39+01:00)
    • Add more tests for Math symbols. (Ivan Enderlin, 2015-01-06T11:22:53+01:00)
    • Add emoji and other symbols supports to toAscii. (Ivan Enderlin, 2015-01-06T11:17:32+01:00)
    • Update toAscii to use a transliterator. (Ivan Enderlin, 2015-01-06T10:58:07+01:00)
    • Add transliterator support. (Ivan Enderlin, 2015-01-06T10:57:30+01:00)
    • Happy new year! (Ivan Enderlin, 2015-01-05T14:52:34+01:00)
    Source code(tar.gz)
    Source code(zip)
  • 2.14.12.24(Feb 19, 2015)

    • Clean code. (Julien Bianchi, 2014-12-24T08:44:59+01:00)
    • Add tests for Hoa\String\Search. (Ivan Enderlin, 2014-12-23T14:15:21+01:00)
    • toBinaryCode has a better semantics. (Ivan Enderlin, 2014-12-23T14:11:02+01:00)
    • Use hexadecimal everywhere. (Ivan Enderlin, 2014-12-23T12:33:00+01:00)
    • Tests are green now. (Ivan Enderlin, 2014-12-23T12:27:38+01:00)
    • New toCode method, without UCS-2. (Ivan Enderlin, 2014-12-23T12:07:22+01:00)
    • Add tests. (Ivan Enderlin, 2014-12-23T02:15:55+01:00)
    • Fix flags between global and local in match. (Ivan Enderlin, 2014-12-23T02:13:50+01:00)
    • Fix compare if Collator is not present. (Ivan Enderlin, 2014-12-23T02:13:16+01:00)
    • Wrong append and prepend algorithm. (Ivan Enderlin, 2014-12-23T02:12:30+01:00)
    • Move to PHP5.4 and remove from/import. (Ivan Enderlin, 2014-12-22T22:44:40+01:00)
    Source code(tar.gz)
    Source code(zip)
  • 2.14.12.10(Feb 19, 2015)

  • 2.14.11.09(Feb 19, 2015)

    • Format code. #mania (Ivan Enderlin, 2014-10-05T15:09:31+02:00)
    • Implement the String::copy method. (Marc Lemay, 2014-10-05T15:08:33+02:00)
    Source code(tar.gz)
    Source code(zip)
  • 2.14.09.23(Feb 19, 2015)

  • 2.14.09.16(Feb 19, 2015)

Owner
Hoa
Hoa is a modular, extensible and structured set of PHP libraries.
Hoa
The Universal Device Detection library will parse any User Agent and detect the browser, operating system, device used (desktop, tablet, mobile, tv, cars, console, etc.), brand and model.

DeviceDetector Code Status Description The Universal Device Detection library that parses User Agents and detects devices (desktop, tablet, mobile, tv

Matomo Analytics 2.4k Jan 5, 2023
A fast PHP slug generator and transliteration library that converts non-ascii characters for use in URLs.

URLify for PHP A fast PHP slug generator and transliteration library, started as a PHP port of URLify.js from the Django project. Handles symbols from

Aband*nthecar 667 Dec 20, 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
ColorJizz is a PHP library for manipulating and converting colors.

#Getting started: ColorJizz-PHP uses the PSR-0 standards for namespaces, so there should be no trouble using with frameworks like Symfony 2. ###Autolo

Mikeemoo 281 Nov 25, 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
Library for free use Google Translator. With attempts connecting on failure and array support.

GoogleTranslateForFree Packagist: https://packagist.org/packages/dejurin/php-google-translate-for-free Library for free use Google Translator. With at

Yurii De 122 Dec 23, 2022
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

Volodymyr Stelmakh 77 Sep 16, 2022
Text - Simple 1 Class Text Manipulation Library

Text - Simple 1 Class Text Manipulation Library Do you remember PHP's string functions? If not, just wrap you text with Text! It will save a minute on

Kazuyuki Hayashi 51 Nov 16, 2021
The Hoa\Ustring library.

Hoa is a modular, extensible and structured set of PHP libraries. Moreover, Hoa aims at being a bridge between industrial and research worlds. Hoa\Ust

Hoa 402 Jan 4, 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
PCRE wrapping library that offers type-safe preg_* replacements.

composer/pcre PCRE wrapping library that offers type-safe preg_* replacements. If you are using a modern PHP version you are probably better off using

Composer 308 Dec 30, 2022
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

Patrick Schur 738 Dec 28, 2022
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
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

Colin O'Dell 34 Nov 28, 2022
Image optimization / compression library. This library is able to optimize png, jpg and gif files in very easy and handy way. It uses optipng, pngquant, pngcrush, pngout, gifsicle, jpegoptim and jpegtran tools.

Image Optimizer This library is handy and very easy to use optimizer for image files. It uses optipng, pngquant, jpegoptim, svgo and few more librarie

Piotr Śliwa 879 Dec 30, 2022
PHP Exif Library - library for reading and writing Exif headers in JPEG and TIFF files using PHP.

PEL: PHP Exif Library README file for PEL: PHP Exif Library. A library with support for reading and writing Exif headers in JPEG and TIFF images using

null 264 Dec 4, 2022
BeckhoffPLCSoapClient - SoapClient to communicate with BeckHoff PLC. Library made in PHP based on TcAdsWebService JavaScript Library.

BeckhoffPLCSoapClient - SoapClient to communicate with BeckHoff PLC. Library made in PHP based on TcAdsWebService JavaScript Library.

null 3 May 18, 2022
EmailReplyParser is a PHP library for parsing plain text email content, based on GitHub's email_reply_parser library written in Ruby

EmailReplyParser EmailReplyParser is a PHP library for parsing plain text email content, based on GitHub's email_reply_parser library written in Ruby.

William Durand 606 Dec 8, 2022
Library JGU is a website created for a university library system information. Made with PHP & TailwindCSS.

Library JGU Library JGU is a website created for a university library system information. Made with PHP & TailwindCSS. Key Features • How To Use • Rel

Azkazikna Ageung Laksana 23 Oct 7, 2022
This library extends the 'League OAuth2 Client' library to provide OpenID Connect Discovery support for supporting providers that expose a .well-known configuration endpoint.

OpenID Connect Discovery support for League - OAuth 2.0 Client This library extends the League OAuth2 Client library to provide OpenID Connect Discove

null 3 Jan 8, 2022