akimimi/strings

Akimimi strings library

1.0.0 2022-03-21 08:20 UTC

This package is auto-updated.

Last update: 2024-10-25 14:20:07 UTC


README

Description

This library provides some string utilities.

EditDistance class calculates the edit distance between two strings. Wagner-Fischer algorithm is currently provided.

PlateUtil provides functions for plate number on vehicles.

Installation

This library support Add require with composer CLI.

composer require akimimi/strings

Otherwise, add require to your composer.json.

{
  "require": {
     "akimimi/strings": ">=1.0.0"
  }
}

Use Composer to install requires

composer install

Usage

After installation by composer, you can declare use for PlatUtil class.

<?php
use Akimimi\Strings\PlateUtil;

$plate1 = "京Q7BP06";
$plate2 = "晋7BP0A6";

$distance = PlateUtil::Distance($plate1, $plate2, 0.5); // return 2.5

Uninstall

With composer, we can remove library with composer CLI.

composer remove akimimi/strings