-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUtils.java
34 lines (30 loc) · 1.19 KB
/
Utils.java
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
/*
* Copyright (C) 2010 WeaveBytes, Inc.,
*
* Confidential, all rights reserved. No distribution is permitted.
___ _______ ____ ________
\ \ __ / __| / \ / ___|
\ \ / \ / |_ / /\ \ / |_
\ \/ \/ /| _| / /__\ \/ /| _|
\ /\ / | |__/ ______ / | |___
\__/ \__/ |_______/ \ _/ |______|
___ __
______ | | ________ __ __ | |
/ ___| | | / __ \ | | | | _______| |
| | | | | | | | | | | | / ____| |
| |____| |__ | |__| |__| \____/ | \ \____| |
\_______|______\________/__ \________/__ \_________|
*/
//Description: Registration.java is the class for registering a new user on weavecloud
//Creation Date: July 20, 2011
//Authors : Simranpal, Varinder Pal Singh
class Utils {
public static boolean ensurePattern(String charSet, String str) {
if(str.length()==0 || charSet.length()==0) return false;
for(int i=0; i<str.length(); i++) {
String ch = ""+str.charAt(i);
if(charSet.indexOf(ch) == -1) return false;
}
return true;
}//ensurePattern
}//Utils