Add Tools class
This commit is contained in:
parent
cfde7a5db6
commit
b525655bd2
|
@ -0,0 +1,14 @@
|
|||
<?php
|
||||
namespace Westdc\Helpers;
|
||||
|
||||
class Tools {
|
||||
/**
|
||||
* 判断是否为UUID字符串
|
||||
* 返回结果为0或1
|
||||
*/
|
||||
public static function isUUID($uuid) {
|
||||
return preg_match("/^[0-9A-Za-z]{8}-[0-9A-Za-z]{4}-[0-9A-Za-z]{4}-[0-9A-Za-z]{4}-[0-9A-Za-z]{12}$/",$uuid);
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue