pnlinh/vietnamese-converter

A php class that converts Vietnamese characters into different character set

v1.2 2019-09-09 04:16 UTC

This package is auto-updated.

Last update: 2024-05-09 15:03:52 UTC


README

StyleCI

Installation

Require this package with composer.

composer require pnlinh/vietnamese-converter

Usage

<?php

require_once __DIR__ . '/vendor/autoload.php';

use Pnlinh\VietnameseConverter\VietnameseConverter;

$output = VietnameseConverter::make()
			       ->convert('Tôi tên là Ngô Chí Dũng. Người đã tạo ra cái phần mềm này.');

echo $output; // Toi ten la Ngo Chi Dung. Nguoi da tao ra cai phan mem nay.

Available Methods

- convert($input)
- convert($input, 'unicode', 'virq');
- convert($input, 'unicode', 'vnet');
- convert($input, 'unicode', 'vni');
- convert($input, 'unicode', 'ascii');
- tolower($input)
- toupper($input)
- ucfirst($input)
- ucwords($input)  

$input is a unicode string

Test

composer test

Credits

License

The MIT License (MIT)