PHP code example of williamsampaio / string-utils

1. Go to this page and download the library: Download williamsampaio/string-utils library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

williamsampaio / string-utils example snippets




use StringUtils\StringProcessor;

,m  ! m&e(n)#ezes;?    sãm*pai|o ';

$str = StringProcessor::removeSpecialCharacters($str);
$str = StringProcessor::ptBrReplaceAccentedCharacters($str);
$str = StringProcessor::trimWhitespaces($str);
$str = StringProcessor::styleTitle($str);

echo $str;




use StringUtils\StringProcessor;

,m  ! m&e(n)#ezes;?    sãm*pai|o ';

$str = StringProcessor::input($str, [
    StringProcessor::REMOVE_SPECIAL_CHARACTERS,
    StringProcessor::PT_BR_REPLACE_ACCENTED_CHARACTERS,
    StringProcessor::TRIM_WHITESPACES,
    StringProcessor::STYLE_TITLE
]);

echo $str;