Valid Username without Regex - java

The Question is to check a valid username:
Conditions are:
1.The username consists of 8 to 30 characters inclusive. If the username consists of less than 8 or greater than 30 characters, then it is an invalid username.
2.The username can only contain alphanumeric characters and underscores (_). Alphanumeric characters describe the character set consisting of lowercase characters [a-z], uppercase characters [A-Z], and digits [0-9].
3.The first character of the username must be an alphabetic character, i.e., either lowercase character [a-z] or uppercase character [A-Z].
Sample Input:
8
Julia
Samantha
Samantha_21
1Samantha
Samantha?10_2A
JuliaZ007
Julia#007
_Julia007
Sample Output:
Invalid
Valid
Valid
Invalid
Invalid
Valid
Invalid
Invalid
I am getting wrong output to some cases.
For Input: JuliaZ007 , I should get Valid but getting Invalid. Remaining are correct.
Can I know what's wrong in the code.
https://www.hackerrank.com/challenges/valid-username-checker/problem?isFullScreen=false
import java.io.*;
import java.util.*;
public class Solution {
private static final Scanner scan = new Scanner(System.in);
public static void main(String[] args) {
int flag=1;
int n = Integer.parseInt(scan.nextLine());
while (n-- != 0) {
String userName = scan.nextLine();
char a[] = userName.toCharArray();
String specialCharactersString = "!##$%&*()'+,-./:;<=>?[]^`{|}";
for (int i=0;i<userName.length();i++)
{
char ch = userName.charAt(i);
if(specialCharactersString.contains(Character.toString(ch)) && Character.isLetterOrDigit(ch)==false)
{
flag=0;
}
}
if (userName.length()>=8 && userName.length()<=30 && Character.isLetter(a[0])==true && flag==1) {
System.out.println("Valid");
} else {
System.out.println("InValid");
}
}
}
}

With Regex
In your case regular expression is most appropriate:
import java.util.Scanner;
import java.util.regex.Pattern;
public class Solution {
private static final Scanner scan = new Scanner(System.in);
public static void main(String[] args) {
final String regex = "^[a-zA-Z][\\w_]{7,29}$";
final Pattern pattern = Pattern.compile(regex, Pattern.MULTILINE);
int n = Integer.parseInt(scan.nextLine());
while (n-- != 0) {
String userName = scan.nextLine();
if (pattern.matcher(userName).matches())
System.out.println("Valid");
else
System.out.println("InValid");
}
}
}
Without Regex
import java.util.Scanner;
public class Solution {
private static final Scanner scan = new Scanner(System.in);
public static void main(String[] args) {
int n = Integer.parseInt(scan.nextLine());
while (n-- != 0) {
String userName = scan.nextLine();
if (isValid(userName))
System.out.println("Valid");
else
System.out.println("InValid");
}
}
public static boolean isValid(String userName) {
if (!Character.isAlphabetic(userName.charAt(0))
|| userName.length() < 8
|| userName.length() > 30)
return false;
for (char c : userName.toCharArray()) {
if (!Character.isLetterOrDigit(c) && c != '_')
return false;
}
return true;
}
}
Explain what causes the problem in the program
Your problem is caused by the flag.
Before JuliaZ007, you have the name Samantha?10_2A, but this name sets the flag to 0.
And when you are in the JuliaZ007, the flag is always 0 and you get a InValid.
To correct this problem, you can reset flag to 1 on each new name.
For this, you can simply move the int flag = 1 in the while.
Example :
import java.io.*;
import java.util.*;
public class Solution {
private static final Scanner scan = new Scanner(System.in);
public static void main(String[] args) {
int n = Integer.parseInt(scan.nextLine());
while (n-- != 0) {
int flag = 1;
String userName = scan.nextLine();
char a[] = userName.toCharArray();
String specialCharactersString = "!##$%&*()'+,-./:;<=>?[]^`{|}";
for (int i = 0; i < userName.length(); i++) {
char ch = userName.charAt(i);
if (specialCharactersString.contains(Character.toString(ch))
&& Character.isLetterOrDigit(ch) == false) {
flag = 0;
}
}
if (userName.length() >= 8 && userName.length() <= 30 && Character.isLetter(a[0]) == true && flag == 1) {
System.out.println("Valid");
} else {
System.out.println("InValid");
}
}
}
}

The username consists of 8 to 30 characters inclusive. If the username consists of less than 8 or greater than 30 characters, then it is an invalid username.
boolean valid = true;
if (userName.length() < 8 || userName.length() > 30) {
valid = false;
}
The username can only contain alphanumeric characters and underscores
if (valid) {
for (int i = 0; i < userName.length(); i++) {
boolean temp = c
Character c = userName.charAt(i);
valid = Character.isLetterOrDigit(c);
// before invalidating, check to see if it is an underscore
if (!valid) {
valid = c == '_';
if (!valid)
break;
}
}
}
The first character of the username must be an alphabetic character
if (valid) {
valid = Character.isLetter(userName.charAt(0));
}
Once you execute all validation steps, simply return valid;. On a side note, you can check the rule of the first character while looping to check the validity of the remaining character. I just did separate checks for clarity and for separating all three requirements for validation.
LASTLY, I want to point out this is most likely NOT the most optimal solution for non-regex. However, I broke it down in these steps because I feel strongly that as a beginner developer, you should attack problems in this manner: first break down the problem into individual, smaller problems. Then, come up to the solution of each independently, and lastly, integrate the smaller solutions into the final product.

Note that methods in class java.lang.Character, such as isLetterOrDigit, will check for characters (or digits) in any language.
Since your question stipulates that the digits must be those commonly referred to as arabic numerals and the letters must be those in the English alphabet, the below code uses the unicode code points of each character in the user-entered userName.
import java.util.Scanner;
public class Solution {
private static final Scanner scan = new Scanner(System.in);
public static void main(String[] args) {
String result;
int n = Integer.parseInt(scan.nextLine());
while (n-- != 0) {
result = "invalid";
String userName = scan.nextLine();
int len = userName.length();
if (len >= 8 && len <= 30) {
char[] letters = userName.toCharArray();
if ((letters[0] >= 65 && letters[0] <= 90) || (letters[0] >= 97 && letters[0] <= 122)) {
int i = 1;
for (; i < len; i++) {
if ((letters[i] >= 48 && letters[i] <= 57) ||
(letters[i] >= 65 && letters[i] <= 90) ||
(letters[i] >= 97 && letters[0] <= 122) ||
(letters[i] == 95)) {
continue;
}
break;
}
if (i == len) {
result = "valid";
}
}
}
System.out.println(result);
}
}
}
Edit
Just for the sake of it, here is a solution that uses the stream API.
import java.util.Scanner;
public class Solution {
private static final Scanner scan = new Scanner(System.in);
public static void main(String[] args) {
String result;
int n = Integer.parseInt(scan.nextLine());
while (n-- != 0) {
result = "invalid";
String userName = scan.nextLine();
int len = userName.length();
if (len >= 8 && len <= 30) {
char letter = userName.charAt(0);
if ((letter >= 65 && letter <= 90) || (letter >= 97 && letter <= 122)) {
if (userName.chars()
.skip(1L)
.allMatch(c -> (c >= 48 && c <= 57) || // c is a digit
(c >= 65 && c <= 90) || // c is uppercase letter
(c >= 97 && c <= 122) || // c is lowercase letter
(c == 95))) { // c is underscore
result = "valid";
}
}
}
System.out.println(result);
}
}
}

Related

Java email validation (No regex allowed)

I need to write an email validation script. It needs to take the email typed in from the user and verify is certain criteria are met and give a true/false. Regex is NOT allowed.
//This is my scanner:
Scanner isValidEmail = new Scanner(System.in);
System.out.print("Please enter your email: ");
String email = isValidEmail.nextLine();
I now need to check using various methods is it has letters, numbers, underscore, only 1 #, etc.
I have written booleans to verify those (examples):
//methos isValidPrefixChar to verify character
public static boolean isValidPrefixChar(char a) {
if (isAlphanumeric(a) || a == '-' || a == '_' || a == '.') {
return true;
} else {
return false;
}
}
//method getDomain() that takes as input a String representing a possible email address.
public static String getDomain(String possibleEmail) {
int i;
for (i = 0; i < possibleEmail.length(); i++) {
if (possibleEmail.charAt(i) == '#') {
break;
}
}
//use a loop to have the character from second half
String domain = "";
int k = i + 1;
while (k < possibleEmail.length()) {
domain = domain + possibleEmail.charAt(k);
k++;
}
return domain;
}
And I have some code that doesn't yet work...
However, I need help in getting the email the user typed in to be the string that gets verified. How do I get the code to check my 'isValidEmail' for these requirements?
EDIT:
Unfortunately, I need to validate each method individually, not as a whole. This doesn't work either because I'm verifying chars in a string.
import java.util.Scanner;
public class Main {
public static void main (String[] args) {
Scanner isValidEmail = new Scanner(System.in);
System.out.print("Please enter your email: ");
String email = isValidEmail.nextLine();
public static boolean isAlphanumeric(String email) {
if (email >= 'a' && email <= 'z' || email >= '0' && email <= '9' || s >= 'A' && email <= 'Z') {
return true;
}
return false;
}
}
}
And this for some reason does not work either, which i thought would work!
public static void main(String[] args) {
Scanner isValidEmail = new Scanner(System.in);
String email = isValidEmail.nextLine();
isAlphaNumeric();
}
public static boolean isAlphaNumeric(String email) {
for (int i = 0; i < email.length(); i++) {
char s = email.charAt(i);
if (s >= 'a' && s <= 'z' || s >= '0' && s <= '9' || s >= 'A' && s <= 'Z')
return false;
}
return true;
}
Etc, etc, per method I need to check against?
I had the simple idea to just replace alphanumeric characters by an 'x', and then check if the remaining pattern matches "x#x".
import java.util.Scanner;
class Main {
private static String alphanumericChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.";
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("Please enter your email: ");
String email = scanner.nextLine();
boolean isValidEmail = isEmail(email);
System.out.println(isValidEmail ? "Thank you." : "This is not a valid email.");
}
public static boolean isEmail(String str) {
String pattern = "";
for (int i = 0; i < str.length(); i++) {
char c = str.charAt(i);
if (isAlphanumeric(c)) {
if (pattern.length() == 0 || pattern.charAt(pattern.length() - 1) != 'x') {
pattern += "x"; // add an x as marker for an alphanumeric string.
}
} else {
pattern += c; // add not matching character
}
}
return pattern.equals("x#x"); // check if pattern matches your email-pattern
}
public static boolean isAlphanumeric(char c) {
boolean found = false;
for (int i = 0; i < alphanumericChars.length(); i++) {
if (alphanumericChars.charAt(i) == c) {
found = true;
break;
}
}
return found;
}
}

Creating a password with only numbers and digits using for loops

I am making a program that takes a string from a user to create a password. However, this password needs to be at least 8 characters or more, and it can only include letters(uppercase and lowercase) and digits. I already did this, however, when I enter in the user input a blank space(ex: "pass word") or a special symbol such as "%" or "&", the method still returns the value true, making the password valid when it shouldn't return this, how do I correct this?
import java.util.Scanner;
public class Password
{
public static void main(String[] args)
{
System.out.println("Enter your password");
Scanner input = new Scanner(System.in);
String pass = input.nextLine();
System.out.println("Is the password valid? " + passwordCheck(pass));
}
public static boolean passwordCheck(String password)
{
boolean pass = false;
for(int i=0; i < password.length(); i++)
{
char c = password.charAt(i);
if(password.length() >= 8)
{
if(c >= 48 && c <= 57)
{
pass = true;
}
else if(c>= 97 && c<= 122)
{
pass = true;
}
else if(c>=65 && c<=90)
{
pass = true;
}
else if(c == 32)
{
pass = false;
}
}
}
return pass;
}
}
you need to break out of the loop once it encounters a space or any other special character.
import java.util.Scanner;
public class Password
{
public static void main(String[] args)
{
System.out.println("Enter your password");
Scanner input = new Scanner(System.in);
String pass = input.nextLine();
System.out.println("Is the password valid? " + passwordCheck(pass));
}
public static boolean passwordCheck(String password)
{
boolean pass = false;
for(int i=0; i < password.length(); i++)
{
char c = password.charAt(i);
if(password.length() >= 8)
{
// also you can directly mention the character instead of looking for its respective ASCII value
if(c >= '0' && c <= '9')
{
pass = true;
}
else if(c>= 'a' && c<= 'z')
{
pass = true;
}
else if(c>='A' && c<='Z')
{
pass = true;
}
else // loop will break if it encounters a space or any other
special character
{
pass = false;
break;
}
}
}
return pass;
}
}

Registering an invalid piece of data from a pattern

I need to use a six letter word and if it has a sequence of letter number letter number letter number, then it will be a valid piece of data. Otherwise, it will be considered invalid. The problem with my code is, it always runs it as valid. Here is my code:
vstatus=false;
char a=pcode.charAt(0);
char b=pcode.charAt(1);
char c=pcode.charAt(2);
char d=pcode.charAt(3);
char e=pcode.charAt(4);
char f=pcode.charAt(5);
if(!Character.isLetter(a)) vstatus=true;
if(!Character.isDigit(b)) vstatus=true;
if(!Character.isLetter(c)) vstatus=true;
if(!Character.isDigit(d)) vstatus=true;
if(!Character.isLetter(e)) vstatus=true;
if(!Character.isDigit(f)) vstatus=true;
if (vstatus=true)
{
System.out.println(convertUpperCase(pcode)+" is a valid postal code");
}
if (vstatus=false)
{
System.out.println(convertUpperCase(pcode)+" is not a valid postal code");
}
I gues this would be shorter code for your problem:
String pcode = "aza2a3";
String regex = "[A-Za-z]{1}[\\d]{1}[A-Za-z]{1}[\\d]{1}[A-Za-z]{1}[\\d]{1}";
boolean matches = pcode.matches(regex);
System.out.println(matches);
matches is true if your string is in form that you need and false if i does not match your required string
In your code, even if one character is correct and all the others are wrong, you make it true. You need to confirm that all the characters are correct. Use &&.
String pcode = "i8i8i8";
char a=pcode.charAt(0);
char b=pcode.charAt(1);
char c=pcode.charAt(2);
char d=pcode.charAt(3);
char e=pcode.charAt(4);
char f=pcode.charAt(5);
if (Character.isLetter(a) && Character.isDigit(b) && Character.isLetter(c) && Character.isDigit(d) && Character.isLetter(e) && Character.isDigit(f)) {
System.out.println("valid");
} else {
System.out.println("not a valid postal code");
}
Or, in a loop:
String pcode = "i8i8i8";
boolean flag = true;
for (int i = 0; i < pcode.length(); i++) {
if (!(i % 2 == 0 && Character.isLetter(pcode.charAt(i)) || Character
.isDigit(pcode.charAt(i)))) {
flag = false;
}
}
if (flag) { System.out.println("valid"); }
else { System.out.println("not valid"); }
Ideally, extract the code into a method:
static boolean isPcodeValid(String s) {
for (int i = 0; i < s.length(); i++) {
if (!(i % 2 == 0 && Character.isLetter(s.charAt(i)) || Character
.isDigit(s.charAt(i)))) {
return false;
}
}
return true;
}
Or, use some Java8+ features:
static boolean isPcodeValid(String s) {
return IntStream.range(0, s.length())
.allMatch(i -> i % 2 == 0 && Character.isLetter(s.charAt(i)) || Character
.isDigit(s.charAt(i)));
}
Finally,
You may use this regex:
String r = [A-Za-z][\d][A-Za-z][\d][A-Za-z][\d]
if (pcode.matches(r)) {
// valid
} else {
// invalid
}
5 different ways, choose the one that suits you the best.

How do I handle punctuation in this Pig Latin translator?

The rest of the code is working perfectly but I cannot figure out how to prevent punctuation from being translated.
public class PigLatintranslator
{
public static String translateWord (String word)
{
String lowerCaseWord = word.toLowerCase ();
int pos = -1;
char ch;
for (int i = 0 ; i < lowerCaseWord.length () ; i++)
{
ch = lowerCaseWord.charAt (i);
if (isVowel (ch))
{
pos = i;
break;
}
}
if (pos == 0 && lowerCaseWord.length () != 1) //translates if word starts with vowel
{
return lowerCaseWord + "way"; // Adding "way" to the end of string
}
else if (lowerCaseWord.length () == 1) //Ignores words that are only 1 character
{
return lowerCaseWord;
}
else if (lowerCaseWord.charAt(0) == 'q' && lowerCaseWord.charAt(1) == 'u')//words that start with qu
{
String a = lowerCaseWord.substring (2);
return a + "qu" + "ay";
}
else
{
String a = lowerCaseWord.substring (1);
String b = lowerCaseWord.substring (0,1);
return a + b + "ay"; // Adding "ay" at the end of the extracted words after joining them.
}
}
public static boolean isVowel (char ch) checks for vowel
{
if (ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u' || ch == 'y')
{
return true;
}
return false;
}
}
I need the translation to ignore punctuation. For example "Question?" should be translated to "estionquay?" (question mark still in the same position and not translated)
As Andreas said, if the function is expecting only one word, it should be the responsibility of the calling function to ensure there's no full sentence or punctuation being passed to it. With that said, if you require the translator to handle this, you need to find the index of the string where the punctuation or non-letter character occurs. I added in a main method to test the function:
public static void main(String[] args) {
System.out.println(translateWord("QUESTION?"));
}
I added a loop into the qu case to find the punctuation being input, the two checks are to see if the character at position i is inside the range of a - z. The sub-string then only goes to the point where the punctuation is found.
int i;
for (i = 0; i < lowerCaseWord.length(); i++) {
if(lowerCaseWord.charAt(i) > 'z' || lowerCaseWord.charAt(i) < 'a') {
break;
}
}
String a = lowerCaseWord.substring (2, i);
String b = lowerCaseWord.substring(i);
return a + "qu" + "ay" + b;
This may need some tweaking if you're worried about words with hyphens and whatnot but this should put across the basic idea.
Here's the output I received:
$javac PigLatintranslator.java
$java -Xmx128M -Xms16M PigLatintranslator
estionquay?

Count y and z at end of a word

This is the problem: Given a string, count the number of words ending in 'y' or 'z' -- so the 'y' in "heavy" and the 'z' in "fez" count, but not the 'y' in "yellow" (not case sensitive). We'll say that a y or z is at the end of a word if there is not an alphabetic letter immediately following it. (Note: Character.isLetter(char) tests if a char is an alphabetic letter.)
countYZ("fez day") → 2
countYZ("day fez") → 2
countYZ("day fyyyz") → 2
This is my code:
public int countYZ(String str) {
int count = 0;
for (int i=0; i<str.length(); i++){
if (Character.isLetter(i) && (Character.isLetter(i+1)==false || i+1==str.length()) && (Character.toLowerCase(str.charAt(i))=='y' || Character.toLowerCase(str.charAt(i))=='z')){
count++;
}
}
return count;
}
I know it's messy, but I'm just trying to figure out why it's not working right now. It returns "0" each run through. In the if statement, I'm checking for: is i a letter? is i+1 a letter or the end of the string? and finally if i is 'y' or 'z'. Appreciate the help!
You could use a regex:
import java.util.regex.Pattern;
import java.util.regex.Matcher;
public int countYZ(String str) {
int count = 0;
Pattern regex = Pattern.compile("[yz](?!\\p{L})", Pattern.CASE_INSENSITIVE);
Matcher regexMatcher = regex.matcher(str);
while (regexMatcher.find()) {
count++;
}
return count;
}
Explanation:
[yz] # Match the letter y or z
(?!\p{L}) # Assert that no letter follows after that
Use split() and endsWith()
public static int countYZ(String str) {
int count = 0;
String temp[] = str.split(" ");
for (int i = 0; i < temp.length; i++) {
if (temp[i].trim().endsWith("y") || temp[i].trim().endsWith("z"))
count++;
}
return count;
}
Output: for all your cases as required
countYZ("fez day") → 2
countYZ("day fez") → 2
countYZ("day fyyyz") → 2
try this fix
for (int i = 0; i < str.length(); i++) {
if ((Character.toLowerCase(str.charAt(i)) == 'y' || Character
.toLowerCase(str.charAt(i)) == 'z')
&& i == str.length() - 1
|| !Character.isLetter(str.charAt(i + 1))) {
count++;
}
}
Try This
public class CountXY {
/**
* #param args
*/
public static int countXY(String str){
int count = 0;
String strSplit[] = str.split(" ");
for(String i:strSplit){
if(i.endsWith("y")||i.endsWith("z")||i.endsWith("Y")||i.endsWith("Z")){
count++;
}
}
return count;
}
public static void main(String[] args) {
// TODO Auto-generated method stub
String str = "Abcy Asdz z z z y y y yyu ZZ Y ";
System.out.println("Count::"+countXY(str));
}
}
public static int countYZ(String str) {
String[] array = str.split("[^a-zA-Z]");
int count = 0;
for (String s : array) {
if (s.toLowerCase().trim().endsWith("y") || s.toLowerCase().trim().endsWith("z"))
count++;
}
return count;
}
Your code is not working because following two conditions
Character.isLetter(i) --> here you are checking isLetter for the i which is int
(Character.isLetter(i+1)==false -> it will cause indexout of error
Please check following I have check its working fine, its just modified version of your code
public class FirstClass {
public static void main(String args[]) {
String string="fez day";
int count = 0;
String[] strcheck = string.split(" ");
for (String str : strcheck) {
if (Character.isLetter(str.charAt(str.length()-1)) &&(Character.toLowerCase(str.charAt(str.length()-1))=='y' || Character.toLowerCase(str.charAt(str.length()-1))=='z')){
count++;
}
}
System.out.println(count);
}
}
Hope this will help, Good Luck
You can try this too
public static void main(String[] args){
System.out.println(countYZ("abcxzy"));
}
public static int countYZ(String str) {
int countYandZ=0;
String[] arr=str.split(" ");
for (String i:arr){
if(("Y".equalsIgnoreCase(String.valueOf(i.charAt(i.length()-1))))||("Z".equalsIgnoreCase(String.valueOf(i.charAt(i.length()-1))))){
countYandZ++;
}
}
return countYandZ;
}
Here's what I've done:
public int countYZ(String str) {
//Initialize a return integer
int ret = 0;
//If it has at least 2 characters, we check both ends to see how many matching instances we have.
if (str.length() >= 2)
{
if (!Character.isLetter(str.charAt(1)) && (str.charAt(0) == 'y' || str.charAt(0) == 'Y' || str.charAt(0) == 'z' || str.charAt(0) == 'Z'))
{
ret++;
}
if (Character.isLetter(str.charAt(str.length() - 2)) && (str.charAt(str.length()-1) == 'y' || str.charAt(str.length()-1) == 'Y' || str.charAt(str.length()-1) == 'z' || str.charAt(str.length()-1) == 'Z'))
{
ret++;
}
}
//If it has more than 3 characters, we check the middle using a for loop.
if (str.length() >= 3)
{
for (int i = 2; i < str.length(); i++)
{
char testOne = str.charAt(i-2);
char testTwo = str.charAt(i-1);
char testThree = str.charAt(i);
//if the first char is a letter, second is a "YZyz" char, and the third is not a letter, we increment ret by 1.
if (Character.isLetter(testOne) && (testTwo == 'y' || testTwo == 'Y' || testTwo == 'z' || testTwo == 'Z') && (!Character.isLetter(testThree)))
{
ret++;
}
}
}
return ret;
}
public int countYZ(String str) {
int count=0;
if ( str.charAt(str.length() - 1) == 'z'||
str.charAt(str.length() - 1) == 'y'||
str.charAt(str.length() - 1) == 'Z'||
str.charAt(str.length() - 1) == 'Y' ) {
count += 1;
}
for (int i = 0; i < str.length(); i++) {
if ( i > 0 ) {
if ( !( Character.isLetter(str.charAt(i)) ) ) {
if ( str.charAt(i - 1) == 'y' ||
str.charAt(i - 1) == 'z' ||
str.charAt(i - 1) == 'Y' ||
str.charAt(i - 1) == 'Z' ) {
count += 1;
}
}
}
}
return count;
}
This allows the words to be separated by anything other than a letter. whitespace, numbers, etc.
public int countYZ(String str) {
int count = 0;
String newStr = str.toLowerCase();
for (int i =0; i < newStr.length(); i++){
if (!Character.isLetter(newStr.charAt(i))){
if (i > 0 && (newStr.charAt(i-1) == 'y' || newStr.charAt(i-1) == 'z'))
count++;
}
}
if (newStr.charAt(str.length()-1) == 'z' || newStr.charAt(str.length()-1) == 'y')
count++;
return count;
}

Categories

Resources