Add Tools class

This commit is contained in:
wlx 2014-09-21 22:57:41 +08:00
parent cfde7a5db6
commit b525655bd2
1 changed files with 14 additions and 0 deletions

14
Westdc/Helpers/Tools.php Normal file
View File

@ -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);
}
}