Skip to content

Conversation

123himanshi-khatri
Copy link
Owner

This pull request contains the submission for Task 1 of the Java String Operations assignment.
Features implemented in the MyString class:

  1. append(String newString)

    • Appends a string to the current string with proper spacing.
  2. countWords()

    • Counts the number of words in the current string.
  3. replace(String a, String b)

    • Replaces all occurrences of a substring with a new string with descriptive prompts.
  4. isPalindrome()

    • Checks if the current string is a palindrome (ignores spaces and case).
  5. splice(int start, int length)

    • Removes a substring starting at a given index with a given length.
  6. split(String pattern)

    • Splits the string using a user-defined pattern and displays the parts.
  7. maxRepeat()

    • Finds and displays the character that repeats the most in the string.
  8. sort()

    • Sorts all characters in the string alphabetically.
  9. shift(int n)

    • Shifts the first n characters to the end of the string.
  10. reverse()

    • Reverses the current string.
      All changes are committed to the branch Assignment_Task1 and are ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant