are there any functions in java like ispunct, isspace in C_?
-
hi there i am trying write a function that checks if a string contains punctuation characters like %,&,!. because i dont want to user enter an invalid name last_name so i want check the string.
-
well yes i know this class but i guess there arent any specific functions which they check specific characters. as you see in the link http://cplusplus.com/reference/clibrary/cctype/ there are several functions. but in java i can't check a string contains only alphabetic characters_?
-
well yes i know this class but i guess there arent any specific functions which they check specific characters. as you see in the link http://cplusplus.com/reference/clibrary/cctype/ there are several functions. but in java i can't check a string contains only alphabetic characters_?
You can do this using regular expressions. A google search for "java regular expression" will give you some good links.
-
You can do this using regular expressions. A google search for "java regular expression" will give you some good links.
-
well yes i know this class but i guess there arent any specific functions which they check specific characters. as you see in the link http://cplusplus.com/reference/clibrary/cctype/ there are several functions. but in java i can't check a string contains only alphabetic characters_?
-
hi there i am trying write a function that checks if a string contains punctuation characters like %,&,!. because i dont want to user enter an invalid name last_name so i want check the string.
quartaela wrote:
because i dont want to user enter an invalid name last_name
How exactly did you determine that such characters would be invalid in the name? Or more specifically is this a business requirement? And what exactly do you think the business process will be if someones legal names does have one of the characters that you excluded?
-
hi there i am trying write a function that checks if a string contains punctuation characters like %,&,!. because i dont want to user enter an invalid name last_name so i want check the string.
-
quartaela wrote:
because i dont want to user enter an invalid name last_name
How exactly did you determine that such characters would be invalid in the name? Or more specifically is this a business requirement? And what exactly do you think the business process will be if someones legal names does have one of the characters that you excluded?