String

Level: Beginner

1. Write a function to reverse a string.
2. Implement a function to check if a string is a palindrome.
3. Write a function to find the length of a string.
4. Implement a function to count the number of vowels in a string.
5. Write a function to count the number of consonants in a string.
6. Implement a function to count the number of words in a string.
7. Write a function to convert a string to uppercase.
8. Implement a function to convert a string to lowercase.
9. Write a function to capitalize the first letter of each word in a string.
10. Implement a function to find the frequency of each character in a string.
11. Write a function to remove all white spaces from a string.
12. Implement a function to remove all occurrences of a given character from a string.
13. Write a function to check if two strings are anagrams.
14. Implement a function to replace all spaces in a string with a given character.
15. Write a function to find the first non-repeating character in a string.
16. Implement a function to find the last non-repeating character in a string.
17. Write a function to check if a string contains only digits.
18. Implement a function to check if a string contains only alphabets.
19. Write a function to check if a string contains only alphanumeric characters.
20. Implement a function to find the longest word in a string.
21. Write a function to find the shortest word in a string.
22. Implement a function to count the occurrences of a given character in a string.
23. Write a function to find the first occurrence of a substring in a string.
24. Implement a function to find the last occurrence of a substring in a string.
25. Write a function to check if a string starts with a given substring.
26. Implement a function to check if a string ends with a given substring.
27. Write a function to split a string into an array of words.
28. Implement a function to join an array of words into a single string.
29. Write a function to remove duplicate characters from a string.
30. Implement a function to find the most frequent character in a string.

Intermediate Level: View

Advanced Level: View