[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/vendor/voku/portable-ascii/build/docs/ -> base.md (source)

   1  [![Build Status](https://travis-ci.com/voku/portable-ascii.svg?branch=master)](https://travis-ci.com/voku/portable-ascii)
   2  [![Build status](https://ci.appveyor.com/api/projects/status/gnejjnk7qplr7f5t/branch/master?svg=true)](https://ci.appveyor.com/project/voku/portable-ascii/branch/master)
   3  [![Coverage Status](https://coveralls.io/repos/voku/portable-ascii/badge.svg?branch=master&service=github)](https://coveralls.io/github/voku/portable-ascii?branch=master)
   4  [![Codacy Badge](https://api.codacy.com/project/badge/Grade/997c9bb10d1c4791967bdf2e42013e8e)](https://www.codacy.com/app/voku/portable-ascii)
   5  [![Latest Stable Version](https://poser.pugx.org/voku/portable-ascii/v/stable)](https://packagist.org/packages/voku/portable-ascii) 
   6  [![Total Downloads](https://poser.pugx.org/voku/portable-ascii/downloads)](https://packagist.org/packages/voku/portable-ascii)
   7  [![License](https://poser.pugx.org/voku/portable-ascii/license)](https://packagist.org/packages/voku/portable-ascii)
   8  [![Donate to this project using Paypal](https://img.shields.io/badge/paypal-donate-yellow.svg)](https://www.paypal.me/moelleken)
   9  [![Donate to this project using Patreon](https://img.shields.io/badge/patreon-donate-yellow.svg)](https://www.patreon.com/voku)
  10  
  11  # 🔡 Portable ASCII
  12  
  13  ## Description
  14  
  15  It is written in PHP (PHP 7+) and can work without "mbstring", "iconv" or any other extra encoding php-extension on your server. 
  16  
  17  The benefit of Portable ASCII is that it is easy to use, easy to bundle.
  18  
  19  The project based on ...
  20  + Sean M. Burke's work (https://metacpan.org/pod/Text::Unidecode)
  21  + Tomaz Solc's work (https://pypi.org/project/Unidecode/)
  22  + Portable UTF-8 work (https://github.com/voku/portable-utf8) 
  23  + Daniel St. Jules's work (https://github.com/danielstjules/Stringy) 
  24  + Johnny Broadway's work (https://github.com/jbroadway/urlify)
  25  + and many cherry-picks from "github"-gists and "Stack Overflow"-snippets ...
  26  
  27  ## Index
  28  
  29  * [Alternative](#alternative)
  30  * [Install](#install-portable-ascii-via-composer-require)
  31  * [Why Portable ASCII?](#why-portable-ascii)
  32  * [Requirements and Recommendations](#requirements-and-recommendations)
  33  * [Usage](#usage)
  34  * [Class methods](#class-methods)
  35  * [Unit Test](#unit-test)
  36  * [License and Copyright](#license-and-copyright)
  37  
  38  ## Alternative
  39  
  40  If you like a more Object Oriented Way to edit strings, then you can take a look at [voku/Stringy](https://github.com/voku/Stringy), it's a fork of "danielstjules/Stringy" but it used the "Portable ASCII"-Class and some extra methods. 
  41  
  42  ```php
  43  // Portable ASCII
  44  use voku\helper\ASCII;
  45  ASCII::to_transliterate('déjà σσς iıii'); // 'deja sss iiii'
  46  
  47  // voku/Stringy
  48  use Stringy\Stringy as S;
  49  $stringy = S::create('déjà σσς iıii');
  50  $stringy->toTransliterate();              // 'deja sss iiii'
  51  ```
  52  
  53  ## Install "Portable ASCII" via "composer require"
  54  ```shell
  55  composer require voku/portable-ascii
  56  ```
  57  
  58  ##  Why Portable ASCII?[]()
  59  I need ASCII char handling in different classes and before I added this functions into "Portable UTF-8",
  60  but this repo is more modular and portable, because it has no dependencies.
  61  
  62  ## Requirements and Recommendations
  63  
  64  *   No extensions are required to run this library. Portable ASCII only needs PCRE library that is available by default since PHP 4.2.0 and cannot be disabled since PHP 5.3.0. "\u" modifier support in PCRE for ASCII handling is not a must.
  65  *   PHP 7.0 is the minimum requirement
  66  *   PHP 8.0 is also supported
  67  
  68  ## Usage
  69  
  70  Example: ASCII::to_ascii()
  71  ```php
  72    echo ASCII::to_ascii('�Düsseldorf�', 'de');
  73    
  74    // will output
  75    // Duesseldorf
  76  
  77    echo ASCII::to_ascii('�Düsseldorf�', 'en');
  78    
  79    // will output
  80    // Dusseldorf
  81  ```
  82  
  83  # Portable ASCII | API
  84  
  85  The API from the "ASCII"-Class is written as small static methods.
  86  
  87  
  88  ## Class methods
  89  
  90  %__functions_index__voku\helper\ASCII__%
  91  
  92  %__functions_list__voku\helper\ASCII__%
  93  
  94  
  95  ## Unit Test
  96  
  97  1) [Composer](https://getcomposer.org) is a prerequisite for running the tests.
  98  
  99  ```
 100  composer install
 101  ```
 102  
 103  2) The tests can be executed by running this command from the root directory:
 104  
 105  ```bash
 106  ./vendor/bin/phpunit
 107  ```
 108  
 109  ### Support
 110  
 111  For support and donations please visit [Github](https://github.com/voku/portable-ascii/) | [Issues](https://github.com/voku/portable-ascii/issues) | [PayPal](https://paypal.me/moelleken) | [Patreon](https://www.patreon.com/voku).
 112  
 113  For status updates and release announcements please visit [Releases](https://github.com/voku/portable-ascii/releases) | [Twitter](https://twitter.com/suckup_de) | [Patreon](https://www.patreon.com/voku/posts).
 114  
 115  For professional support please contact [me](https://about.me/voku).
 116  
 117  ### Thanks
 118  
 119  - Thanks to [GitHub](https://github.com) (Microsoft) for hosting the code and a good infrastructure including Issues-Managment, etc.
 120  - Thanks to [IntelliJ](https://www.jetbrains.com) as they make the best IDEs for PHP and they gave me an open source license for PhpStorm!
 121  - Thanks to [Travis CI](https://travis-ci.com/) for being the most awesome, easiest continous integration tool out there!
 122  - Thanks to [StyleCI](https://styleci.io/) for the simple but powerful code style check.
 123  - Thanks to [PHPStan](https://github.com/phpstan/phpstan) && [Psalm](https://github.com/vimeo/psalm) for really great Static analysis tools and for discover bugs in the code!
 124  
 125  ### License and Copyright
 126  
 127  Released under the MIT License - see `LICENSE.txt` for details.


Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer