Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android .NET Trim function in Java?

In an Android app, I am looking for the functionality of the .NET string function [Trim('aaa')] which will trim off the text "aaa" off a string. I don't think this is natively available in Java and I haven't seen that functionality in Android Java textutil library.

Is there an easy way to have a Java app trim a set of characters from the string?

like image 586
Ian Vink Avatar asked Jun 25 '26 00:06

Ian Vink


1 Answers

Use trim or replaceAll.

like image 164
thelost Avatar answered Jun 27 '26 14:06

thelost



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!