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

Need to get the return valued of String.replace() #141

Open
scuniff opened this issue Nov 1, 2023 · 0 comments
Open

Need to get the return valued of String.replace() #141

scuniff opened this issue Nov 1, 2023 · 0 comments

Comments

@scuniff
Copy link

scuniff commented Nov 1, 2023

	while ( entry.contains( "(" ) )
		entry.replace( "(", "" );

	while ( entry.contains( ")" ) )
		entry.replace( ")", "" );

	while ( entry.contains( "[" ) )
		entry.replace( "[", "" );

	while ( entry.contains( "]" ) )
		entry.replace( "]", "" );

String entry is not getting updated from the call to replace().

All these calls to replace() should be modified to:
entry = entry.replace(

Presently I’m assuming these 4 calls to entry.contains() never returns true because I think an infinite loop would occur.

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

No branches or pull requests

1 participant