PHP code example of codeartery / string-utils

1. Go to this page and download the library: Download codeartery/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/ */

    

codeartery / string-utils example snippets




use CodeArtery\String\StrTo;

StrTo::title('hello_world');          // Hello World
StrTo::words('DB settings');          // DB Settings
StrTo::snake('HelloWorld');           // hello_world
StrTo::kebab('HelloWorld');           // hello-world
StrTo::dotted('HelloWorld');          // hello.world
StrTo::studly('hello world');         // HelloWorld
StrTo::camel('hello world');          // helloWorld
StrTo::dotPath('admin/ModuleName');   // admin.module-name
StrTo::slug('Hello World Example');   // hello-world-example



use CodeArtery\String\Hash;

Hash::uniqueHash();      // 40-character unique hash
Hash::uniqueHash(48);    // Custom length, minimum 24