elecena / ic-package-info

从给定字符串中提取IC封装信息

1.17.0 2021-04-16 14:03 UTC

This package is auto-updated.

Last update: 2024-08-30 01:09:04 UTC


README

Stable release phpunit Coverage Status

从给定字符串中提取IC封装信息

安装它

composer require elecena/ic-package-info

示例

<?php

use Elecena\Utils\PackageInfo;

$package = PackageInfo::getPackage('2N7000 N CHANNEL MOSFET, 60V, 200mA, TO-92'); // this will return 'TO-92'

// additionally, PackageInfo normalizes the packages
$package = PackageInfo::getPackage('MOSFET,N CHANNEL,600V,3.7A,SC-67'); // will return 'TO-220F'

// false will be returned when a valid package is not found
$package = PackageInfo::getPackage('foo bar-42'); // will return false