mirror of
https://github.com/bytedream/cryptoGX.git
synced 2025-06-27 16:50:32 +02:00
Add files via upload
This commit is contained in:
21
src/org/blueshard/cryptogx/Utils.java
Normal file
21
src/org/blueshard/cryptogx/Utils.java
Normal file
@ -0,0 +1,21 @@
|
||||
package org.blueshard.cryptogx;
|
||||
|
||||
public class Utils {
|
||||
|
||||
/**
|
||||
* <p>Checks if any character in {@param characters} appears in {@param string}</p>
|
||||
*
|
||||
* @param characters that should be searched in {@param string}
|
||||
* @param string that should be searched for the characters
|
||||
* @return if any character in {@param characters} appears in {@param string}
|
||||
*/
|
||||
public static boolean hasAnyCharacter(CharSequence characters, String string) {
|
||||
for (char c: characters.toString().toCharArray()) {
|
||||
if (string.indexOf(c) != -1) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user