Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated removeTrailingEqualSigns method from PubNubUtil.java #279

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

YogenderSha
Copy link

@YogenderSha YogenderSha commented Jul 15, 2023

Updated the removeTrailingEqualSigns method with StringBuilder .

Instead of repeatedly creating new strings in the while loop, you can use a StringBuilder to remove the trailing equal signs. A stringBuilder is an effiecient way to replace strings without consuming memory due to the immutability of string.

Instead of repeatedly creating new strings in the while loop, you can use a StringBuilder to remove the trailing equal signs. A stringBuilder is an effiecient way to use strings without consuming memory due to the immutability of string. 

Read here more about StringBuilder  : https://stackoverflow.com/questions/41219283/advantage-of-string-over-stringbuilder-in-java
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