PHP code example of raoh / notation-199x
1. Go to this page and download the library: Download raoh/notation-199x 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/ */
raoh / notation-199x example snippets
use Raoh\Notation199x\CaseConversion;
use Raoh\Notation199x\Normalization;
use Raoh\Notation199x\NormalizationForm;
use Raoh\Notation199x\Pattern;
use Raoh\Notation199x\ScalarValues;
use Raoh\Notation199x\TemporalKind;
use Raoh\Notation199x\TemporalText;
use Raoh\Notation199x\WhiteSpace;
ScalarValues::invalidUtf8At("ab\xff"); // 2
ScalarValues::count('日本語'); // 3
CaseConversion::lowercase('ΟΣ'); // 'ος'
CaseConversion::uppercaseWithin('straße', 6); // null: 'STRASSE' is 7 long
Normalization::normalize(NormalizationForm::NFKD, 'ffi'); // 'ffi'
WhiteSpace::contains(0x3000); // true
TemporalText::check(TemporalKind::Instant, '2016-12-31T23:59:60Z'); // TemporalAnswer::LeapSecond
$read = Pattern::read('[0-9]{3}-[0-9]{4}'); // a Pattern, a PatternRefused or a PatternBeyond
if ($read instanceof Pattern) {
$read->matches('123-4567'); // true: the whole string is matched
}