String manipulation and character-based logic:

String manipulation and character-based logic:


๐Ÿ”ข String Parsing and Extraction

  1. Extract all digits from a given string.

  2. Extract all letters from a string.

  3. Extract only uppercase letters from a string.

  4. Extract only lowercase letters from a string.

  5. Extract special characters from a string.

  6. Extract digits and return as an integer array.

  7. Extract words separated by a comma.

  8. Extract domain from an email string.

  9. Extract username from an email string.

  10. Extract numbers from a string and calculate their sum.


๐Ÿ” String Modification

  1. Replace all digits with *.

  2. Replace all vowels with #.

  3. Remove all spaces from a string.

  4. Remove duplicate characters from a string.

  5. Replace all occurrences of a word.

  6. Replace each character with its ASCII value.

  7. Replace uppercase letters with lowercase and vice versa.

  8. Insert a dash between every two digits.

  9. Add commas after every 3 digits in a number string.

  10. Format a string like a phone number: (123)-456-7890.


๐Ÿ”„ Reversal and Transformation

  1. Reverse a string without using built-in methods.

  2. Reverse only words in a sentence.

  3. Reverse only digits in a string.

  4. Reverse string recursively.

  5. Reverse vowels in a string.

  6. Reverse string ignoring special characters.

  7. Reverse every second word in a sentence.

  8. Reverse string keeping numbers at original positions.

  9. Mirror each word in a sentence.

  10. Reverse a string using stack.


๐Ÿ“ Counting Operations

  1. Count vowels in a string.

  2. Count digits in a string.

  3. Count uppercase and lowercase letters.

  4. Count special characters in a string.

  5. Count number of words in a sentence.

  6. Count occurrences of a given character.

  7. Count repeating characters.

  8. Count each character using a Map.

  9. Count the number of lines in a multiline string.

  10. Count substrings of a specific pattern.


๐Ÿ” Validation and Checking

  1. Check if string contains only digits.

  2. Check if string contains only letters.

  3. Check if string is a valid email.

  4. Check if string is palindrome.

  5. Check if two strings are anagrams.

  6. Check if string starts with a vowel.

  7. Check if all characters are unique.

  8. Check if string is alphanumeric.

  9. Check if a password is strong (rules-based).

  10. Check if string contains a substring without using .contains().


๐Ÿ“ฆ Splitting and Joining

  1. Split a string on commas and print each value.

  2. Split camelCase words.

  3. Join string array using hyphen.

  4. Split file path and get filename.

  5. Split URL and extract query parameters.

  6. Split a sentence into words and reverse each word.

  7. Join two strings with alternate characters.

  8. Split string into fixed-size chunks.

  9. Join strings using StringBuilder.

  10. Split string using multiple delimiters.


๐Ÿงฎ Mathematical on Strings

  1. Add two numeric strings.

  2. Multiply two numeric strings.

  3. Check if string is a valid number.

  4. Calculate sum of all digits in a string.

  5. Find average of digits in a string.

  6. Convert Roman numeral string to integer.

  7. Convert binary string to decimal.

  8. Convert decimal to binary string.

  9. Find the largest number in a string.

  10. Extract all integers and sort them.


๐Ÿงช Character Level Logic

  1. Find first non-repeating character.

  2. Find last repeating character.

  3. Check if a character is vowel or consonant.

  4. Print frequency of all characters.

  5. Remove all vowels from string.

  6. Replace digits with their word form.

  7. Print ASCII value of each character.

  8. Convert each character to next character (e.g., a→b).

  9. Encode string using Caesar Cipher.

  10. Find most frequent character.


๐Ÿ’ก Miscellaneous

  1. Compress repeated characters (e.g., aaabb → a3b2).

  2. Decompress encoded string (e.g., a3b2 → aaabb).

  3. Find longest word in a sentence.

  4. Find shortest word in a sentence.

  5. Check if all words in string are unique.

  6. Count capitalized words.

  7. Extract initials from full name.

  8. Extract hashtags from a social media post.

  9. Remove HTML tags from a string.

  10. Check if parentheses in a string are balanced.


๐Ÿงฉ Custom Logic Based

  1. Convert string to title case.

  2. Find longest palindrome in a string.

  3. Remove duplicates while preserving order.

  4. Rearrange string so no same letters are adjacent.

  5. Reorder letters alphabetically.

  6. Convert a sentence to Pig Latin.

  7. Encode string using Run Length Encoding (RLE).

  8. Compare two strings ignoring cases and special characters.

  9. Highlight a specific word in a string.

  10. Extract value from key-value string (e.g., id=123;name=Sunil → get 123).



Comments

Popular posts from this blog

10 automation test cases for https://www.saucedemo.com/ (Sauce Demo)

Java Roadmap for SDET Superstars!

Mastering XPath in Selenium 4 ๐Ÿš€ – Supported Functions & Axes Explained