<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Util; class StrUtil { public static function mask($txUYE, $PN2sA = null, $zgQNU = null, $mjIE_ = '*') { goto hVQyk; M8_uP: $Ntr73 = ''; goto IDL1m; hMdUD: if (null == $PN2sA) { $PN2sA = floor($CFnCX / 2); } goto Ix8VG; x0XlE: return $Ntr73; goto DnCZz; lc5cC: if ($zgQNU >= $CFnCX - 1) { $zgQNU = $CFnCX - 1; } goto M8_uP; LrTq1: if ($zgQNU < $CFnCX - 1) { $Ntr73 .= substr($txUYE, $zgQNU + 1); } goto x0XlE; ug17F: $Ntr73 .= str_repeat($mjIE_, $zgQNU - $PN2sA + 1); goto LrTq1; XobVK: if ($PN2sA < 0) { $PN2sA = 0; } goto lc5cC; Ix8VG: if (null == $zgQNU) { $zgQNU = $PN2sA + floor($CFnCX / 2); } goto XobVK; IDL1m: if ($PN2sA > 0) { $Ntr73 .= substr($txUYE, 0, $PN2sA); } goto ug17F; hVQyk: $CFnCX = strlen($txUYE); goto hMdUD; DnCZz: } public static function passwordStrength($IR5F1) { goto J2BuR; wmc_D: $IR5F1 = preg_replace('/[A-Z]+/', '', $IR5F1); goto VL1JJ; UZ7VN: return $NGk2E; goto AV7wk; eFiKq: if (!empty($IR5F1)) { $NGk2E++; } goto GNhwq; GZcSr: if (!empty($IR5F1)) { $NGk2E++; } goto wmc_D; GNhwq: $IR5F1 = preg_replace('/\\d+/', '', $IR5F1); goto lRJlu; PSoLt: $IR5F1 = preg_replace('/[a-z]+/', '', $IR5F1); goto GZcSr; J2BuR: $NGk2E = 0; goto eFiKq; VL1JJ: if (!empty($IR5F1)) { $NGk2E++; } goto UZ7VN; lRJlu: if (!empty($IR5F1)) { $NGk2E++; } goto PSoLt; AV7wk: } public static function camelize($dx8tw, $nh0ji = '_') { $dx8tw = $nh0ji . str_replace($nh0ji, ' ', strtolower($dx8tw)); return ltrim(str_replace(' ', '', ucwords($dx8tw)), $nh0ji); } public static function uncamelize($qOMto, $nh0ji = '_') { return strtolower(preg_replace('/([a-z])([A-Z])/', '$1' . $nh0ji . '$2', $qOMto)); } public static function startWith($s4iZ7, $Kj9Mj) { foreach ((array) $Kj9Mj as $AWNE2) { if ($AWNE2 != '' && mb_strpos($s4iZ7, $AWNE2) === 0) { return true; } } return false; } }