forked from phpgearbox/string
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHas.php
More file actions
37 lines (34 loc) · 1.44 KB
/
Copy pathHas.php
File metadata and controls
37 lines (34 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php namespace Gears\String\Methods;
////////////////////////////////////////////////////////////////////////////////
// __________ __ ________ __________
// \______ \ |__ ______ / _____/ ____ _____ ______\______ \ _______ ___
// | ___/ | \\____ \/ \ ____/ __ \\__ \\_ __ \ | _// _ \ \/ /
// | | | Y \ |_> > \_\ \ ___/ / __ \| | \/ | ( <_> > <
// |____| |___| / __/ \______ /\___ >____ /__| |______ /\____/__/\_ \
// \/|__| \/ \/ \/ \/ \/
// -----------------------------------------------------------------------------
// Designed and Developed by Brad Jones <brad @="bjc.id.au" />
// -----------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////
use voku\helper\UTF8;
trait Has
{
/**
* Does the string have at least one lower case character?
*
* @return bool Whether or not the string contains a lower case character.
*/
public function hasLowerCase()
{
return $this->regexMatch('.*[[:lower:]]');
}
/**
* Does the string have at least one upper case character?
*
* @return bool Whether or not the string contains an upper case character.
*/
public function hasUpperCase()
{
return $this->regexMatch('.*[[:upper:]]');
}
}