-
Notifications
You must be signed in to change notification settings - Fork 0
/
Functions.txt
38 lines (29 loc) · 1.64 KB
/
Functions.txt
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
35
36
37
38
Codex v1.1
Stack Functions:
isempty(Stack) : Checks if a stack is empty or not.
delete_first_element(Stack) : Deletes the first element from the stack and returns a new stack.
insert_first_element(Stack, element) : Inserts an element at the first positon of the stack and returns a new stack.
auto_stack(size) : Creates a random stack from the given size.
display(Stack) : Displays the stack vertically.
Encryption Functions:
encrypt(text, key) : Encrypts the normal text as per the key.
decrypt(text, key) : Decrypts the encrypted text as per the key.
String Functions:
isstring(string) : Checks if entry is a valid string.
wordcount(text) : Counts the number of words in a string.
vowelcount(text) : Counts the number of vowels in a string.
strreverse(string) : Reverses a string.
Credential Validation:
phonecheck(number) : Checks the phone number for validation.
passcheck(password) : Checks the password for validation.
isemail(email) : Checks for a valid email address.
Credential Database Functions:
register_cred(username,password,path) : Registers the username and password to text file as per the path.
cred_checker(username, password,path) : Checks if password and username matches with the database as per the path.
OTP Plugin:
send_otp(emailid, admin_email, password) : Sends an e-mail containing otp on the email address passed into the function.
List Functions:
listgreatest(list) : returns greatest element of a list.
uniquelist(list) : deletes all the duplicate elements of a list.
DS-Algo:
binary_search(list) : implements binary search.