voku/portable-ascii
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|
The voku/portable-ascii is a performance-optimized package offering a suite of ASCII string handling functionalities for PHP. It works even without "mbstring", "iconv", or any other substantive encoding PHP-extension on your server. This library lightens the burden of writing code for string handling as it is easy to use and bundle.
You can get started with voku/portable-ascii by installing the package using composer, a popular dependency manager for PHP. Run the following command in your terminal:
composer require voku/portable-ascii
After installation, you can easily utilize the library's functionalities. For example:
use voku\helper\ASCII;
echo ASCII::to_ascii('�Düsseldorf�', 'de');
// Output will be: Duesseldorf
In the above example, the ASCII::to_ascii
function is used to convert a string to ASCII format.
Another example is for string sanitization:
use voku\helper\ASCII;
$result = ASCII::clean($str, $normalize_whitespace, $keep_non_breaking_space, $normalize_msword, $remove_invisible_characters);
Where $str
is the input string and the rest are optional boolean parameters.
The comprehensive documentation for the voku/portable-ascii library, including descriptions of all available classes and methods, can be directly accessed from the README files in the GitHub repository. For a deep dive into using the library, consult the class methods section, which provides detailed specifications for each available function.