+ 1
How can I know if a string of letters contains numbers? For example a password: Mariana03
I have found isdigit()but this only says if it is completely of numbers or letters
5 Réponses
+ 3
You could create one function by yourself. Create an array with digits from 0 to 9 and then check wether any character matches the elements of the array with digits...
The rest is to choose the programming language😂
+ 2
Maybe you should change the type of input box from password to text...I am not sure if I got it right...
+ 1
Can you use regex? If yes, what language?
Note, if you've never seen regex before, it may seem weirder than more straightforward solutions (up to you if that matters).
edit: You could use isdigit() on one character at a time, breaking out of your loop (fail condition) if it returns true.
0
yes but if the password is an input? I don't know what length off the password
0
You can creat a function that will define the length of the function and returns it